Update comment.

This commit is contained in:
Patrick Pelissier committed 2017-03-31 21:22:57 +02:00
1 parent 39e8c9e678
commit 6d6150e189
1 file changed
+14 -2
+14 -2
View File
@@ -29,11 +29,19 @@
#include <assert.h>
#include "m-core.h"
/* Fast Fixed Size thread unsafe allocator.
USAGE:
MEMPOOL_DEF(uint, unsigned int)
...
memppol_uint_t m;
mempool_uint_init(m);
// alloc with mempool_uint_alloc(m);
// free with mempool_uin_free(m, ptr);
mempool_uint_clear(m); // Give back memory to system
*/
// NOTE: Can not use m-list since it may be expanded from LIST_DEF
// FIXME: Shall this use standard memory function (malloc) or M_MEMORY_ALLOC?
#define MEMPOOLI_MAX_PER_SEGMENT(type) M_MAX(16*1024 / sizeof (type), 256U)
#define MEMPOOL_DEF(name, type) \
\
typedef union M_C3(mempool_,name,_union_s) { \
@@ -125,4 +133,8 @@
mem->count--; \
} \
/********************************** INTERNAL ************************************/
#define MEMPOOLI_MAX_PER_SEGMENT(type) M_MAX(16*1024 / sizeof (type), 256U)
#endif