--- libelwix/inc/elwix/ampool.h 2014/01/29 14:15:58 1.2.28.1 +++ libelwix/inc/elwix/ampool.h 2015/06/25 16:49:33 1.3.20.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: ampool.h,v 1.2.28.1 2014/01/29 14:15:58 misho Exp $ +* $Id: ampool.h,v 1.3.20.3 2015/06/25 16:49:33 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2014 +Copyright 2004 - 2015 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -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 * @@ -253,6 +255,19 @@ void mpool_xfree(void * __restrict data); * return: =NULL error or !=NULL new allocated string */ char *mpool_xstrdup(const char *str); +/* + * mpool_xstatistics() - elwix memory pool statistics wrapper + * + * @cb = Export statistics to callback + * return: none + */ +void mpool_xstatistics(mpool_stat_cb cb); +/* + * mpool_xdump() - Dump elwix memory pool statistics + * + * return: none + */ +void mpool_xdump(); #endif