From 1a8cae708e536305044767b6717e1d7d0f3e00a0 Mon Sep 17 00:00:00 2001 From: caro Date: Fri, 19 Feb 2010 13:42:34 +0000 Subject: [PATCH] add mempool description in the doc git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@46307 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eina_mempool.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/lib/eina_mempool.c b/src/lib/eina_mempool.c index 68942f7..e61413a 100644 --- a/src/lib/eina_mempool.c +++ b/src/lib/eina_mempool.c @@ -261,6 +261,31 @@ eina_mempool_shutdown(void) * * @brief These functions provide memory pool management. * + * Several mempool are available: + * + * @li @c buddy: It uses the + * "buddy + * allocator" algorithm but the Eina implementation differs in the + * sense that the chunk information is not stored on the chunk itself, + * but on another memory area. This is useful for cases where the + * momery to manage might be slower to access, or limited (like video + * memory). + * @li @c chained_pool: It is the default one. It allocates a big + * chunk of memory with malloc() and split the result in chnks of the + * requested size that are pushed inside a stack. When requested, t + * takes this pointer from the stack to give them to whoever wants + * them. + * @li @c ememoa_fixed and @c ememoa_unknown: experimental allocators + * which could be useful when a fixed amount of memory is needed. + * @li @c fixed_bitmap: It alocates with malloc) 32* the requested + * size and push the pool pointer in an rbtree. To find empty space in + * a pool, it will just search for the first bit set in an int (32 + * bits). Then, when a pointer is freed, it will do a search inside + * the rbtree. + * @li @c pass_through: it just call malloc() and free(). It may be + * faster on some computers than using our own allocators (like having + * a huge L2 cache, over 4MB). + * * @{ */ -- 2.7.4