From e879393c88da1676edff14be5dbf21943ed23bac Mon Sep 17 00:00:00 2001 From: yuqing Date: Wed, 1 Jul 2015 15:17:19 +0800 Subject: [PATCH] add comment --- HISTORY | 3 ++- src/fast_mpool.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index e4c315a..348650b 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,7 @@ -Version 1.16 2015-06-25 +Version 1.16 2015-07-01 * fast_mblock add fast_mblock_delay_free + * add fast_mpool.h and fast_mpool.c Version 1.15 2015-06-16 * fast_mblock.c support none lock diff --git a/src/fast_mpool.h b/src/fast_mpool.h index 2f0a563..267477f 100644 --- a/src/fast_mpool.h +++ b/src/fast_mpool.h @@ -67,10 +67,9 @@ parameters: void fast_mpool_destroy(struct fast_mpool_man *mpool); /** -free a node (put a node to the mpool) +reset for recycle use parameters: mpool: the mpool pointer - pNode: the node to free */ void fast_mpool_reset(struct fast_mpool_man *mpool); @@ -78,6 +77,7 @@ void fast_mpool_reset(struct fast_mpool_man *mpool); alloc a node from the mpool parameters: mpool: the mpool pointer + size: alloc bytes return the alloced ptr, return NULL if fail */ void *fast_mpool_alloc(struct fast_mpool_man *mpool, const int size); @@ -86,6 +86,7 @@ void *fast_mpool_alloc(struct fast_mpool_man *mpool, const int size); get stats parameters: mpool: the mpool pointer + stats: return the stats */ void fast_mpool_stats(struct fast_mpool_man *mpool, struct fast_mpool_stats *stats);