--- libelwix/inc/elwix/ampool.h 2015/06/25 01:19:09 1.3.20.2 +++ libelwix/inc/elwix/ampool.h 2015/07/01 21:48:39 1.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: ampool.h,v 1.3.20.2 2015/06/25 01:19:09 misho Exp $ +* $Id: ampool.h,v 1.5 2015/07/01 21:48:39 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -79,6 +79,7 @@ typedef struct _tagMPool { } pool_bytes; struct { unsigned long max; + unsigned long real; unsigned long curr; } pool_quota; @@ -198,12 +199,13 @@ unsigned long mpool_setquota(mpool_t * __restrict mp, * mpool_getquota() - Get memory quota * * @mp = Memory pool - * @currmem = Return current memory + * @currmem = Return current memory usage + * @realmem = Return current real memory usage * @maxmem = Return max quota size * return: none */ void mpool_getquota(mpool_t * __restrict mp, unsigned long *currmem, - unsigned long *maxmem); + unsigned long *realmem, unsigned long *maxmem); /* * mpool_statistics() - Dump statistics from memory pool buckets * @@ -261,11 +263,14 @@ char *mpool_xstrdup(const char *str); */ void mpool_xstatistics(mpool_stat_cb cb); /* - * mpool_xdump() - Dump elwix memory pool statistics + * mpool_dump() - Dump elwix memory pool statistics * + * @mp = memory pool, if =NULL dump elwix default memory pool + * @fmt = prefix info format string + * @... = argument(s) * return: none */ -void mpool_xdump(); +void mpool_dump(mpool_t * __restrict mp, const char *fmt, ...); #endif