--- libaitsess/inc/aitsess.h 2012/02/28 09:28:00 1.4.2.5 +++ libaitsess/inc/aitsess.h 2012/02/28 10:34:43 1.4.2.6 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsess.h,v 1.4.2.5 2012/02/28 09:28:00 misho Exp $ +* $Id: aitsess.h,v 1.4.2.6 2012/02/28 10:34:43 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -202,6 +202,17 @@ int mpool_free(mpool_t * __restrict mp, void * __restr */ int mpool_free2(mpool_t * __restrict mp, unsigned int size, const char *memname, int purge); /* + * mpool_realloc() Reallocate memory block with new size + * + * @mp = Memory pool + * @data = Allocated memory data + * @newsize = New size of memory block + * @memname = Optional new memory block name + * return: NULL error or !=NULL new reallocated memory block + */ +void *mpool_realloc(mpool_t * __restrict mp, void * __restrict data, + unsigned int newsize, const char *memname); +/* * mpool_getmembynam() Find allocated memory block by size and memory name * * @mp = Memory pool @@ -232,6 +243,16 @@ inline int mpool_chkaddr(void * __restrict data); * return: old maximum memory quota size */ inline unsigned long mpool_setquota(mpool_t * __restrict mp, unsigned long maxmem); +/* + * mpool_getquota() - Get memory quota + * + * @mp = Memory pool + * @currmem = Return current memory + * @maxmem = Return max quota size + * return: none + */ +inline void mpool_getquota(mpool_t * __restrict mp, unsigned long *currmem, + unsigned long *maxmem); /* * mpool_statistics() - Dump statistics from memory pool buckets *