if (!obj->callbacks)
{
- EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 512, );
+ EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 64, );
obj->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks);
if (!obj->callbacks) return;
EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks);
}
- EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, );
+ EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 128, );
fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node);
if (!fn) return;
EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node);
if (!e->callbacks)
{
- EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 512, );
+ EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 64, );
e->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks);
if (!e->callbacks) return;
EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks);
}
- EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, );
+ EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 128, );
fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node);
if (!fn) return;
EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node);
Evas_Object_Image *o;
/* alloc obj private data */
- EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_image", Evas_Object_Image, 256, NULL);
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_image", Evas_Object_Image, 16, NULL);
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Image);
if (!o) return NULL;
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Image);
Evas_Object_Line *o;
/* alloc obj private data */
- EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_line", Evas_Object_Line, 16, NULL);
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_line", Evas_Object_Line, 4, NULL);
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Line);
if (!o) return NULL;
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Line);
{
Evas_Object *obj;
- EVAS_MEMPOOL_INIT(_mp_obj, "evas_object", Evas_Object, 512, NULL);
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object", Evas_Object, 32, NULL);
obj = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object);
if (!obj) return NULL;
EVAS_MEMPOOL_PREP(_mp_obj, obj, Evas_Object);
{
if (obj->size_hints) return;
- EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 512, );
+ EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 32, );
obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints);
if (!obj->size_hints) return;
EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints);
Evas_Object_Polygon *o;
/* alloc obj private data */
- EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_polygon", Evas_Object_Polygon, 32, NULL);
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_polygon", Evas_Object_Polygon, 4, NULL);
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Polygon);
if (!o) return NULL;
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Polygon);
Evas_Object_Rectangle *o;
/* alloc obj private data */
- EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_rectangle", Evas_Object_Rectangle, 256, NULL);
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_rectangle", Evas_Object_Rectangle, 16, NULL);
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Rectangle);
if (!o) return NULL;
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Rectangle);
MAGIC_CHECK_END();
if (!event) return;
if (!func) return;
- EVAS_MEMPOOL_INIT(_mp_cb, "evas_smart_callback", Evas_Smart_Callback, 512, );
+ EVAS_MEMPOOL_INIT(_mp_cb, "evas_smart_callback", Evas_Smart_Callback, 32, );
cb = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Smart_Callback);
if (!cb) return;
EVAS_MEMPOOL_PREP(_mp_cb, cb, Evas_Smart_Callback);
Evas_Object_Smart *o;
/* alloc obj private data */
- EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_smart", Evas_Object_Smart, 256, NULL);
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_smart", Evas_Object_Smart, 32, NULL);
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Smart);
if (!o) return NULL;
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Smart);
Evas_Object_Text *o;
/* alloc obj private data */
- EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_text", Evas_Object_Text, 128, NULL);
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_text", Evas_Object_Text, 8, NULL);
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Text);
if (!o) return NULL;
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Text);
Evas_Object_Textblock *o;
/* alloc obj private data */
- EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_textblock", Evas_Object_Textblock, 64, NULL);
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_textblock", Evas_Object_Textblock, 8, NULL);
o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Textblock);
if (!o) return NULL;
EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Textblock);
NULL
};
+EVAS_MEMPOOL(_mp_obj);
+
/* all nice and private */
static void
evas_object_textgrid_init(Evas_Object *obj)
Evas_Object_Textgrid *o;
/* FIXME: using evas mempool like text ? */
-
- /* alloc obj private data */
- o = calloc(1, sizeof(Evas_Object_Textgrid));
+ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_textgrid", Evas_Object_Textgrid, 4, NULL);
+ o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Textgrid);
+ EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Textgrid);
o->magic = MAGIC_OBJ_TEXTGRID;
o->prev = o->cur;
o->cur.palette_standard = eina_array_new(16);
eina_array_free(o->cur.palette_extended);
o->magic = 0;
/* FIXME: using evas mempool like text ? */
- free(o);
+ EVAS_MEMPOOL_FREE(_mp_obj, o);
}