Diff for /libelwix/inc/elwix/ampool.h between versions 1.1 and 1.4.2.1

version 1.1, 2013/01/17 10:05:35 version 1.4.2.1, 2015/07/01 21:31:26
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013Copyright 2004 - 2015
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 79  typedef struct _tagMPool { Line 79  typedef struct _tagMPool {
         } pool_bytes;          } pool_bytes;
         struct {          struct {
                 unsigned long max;                  unsigned long max;
                   unsigned long real;
                 unsigned long curr;                  unsigned long curr;
         } pool_quota;          } pool_quota;
   
Line 171  char *mpool_strdup(mpool_t * __restrict mp, const char Line 172  char *mpool_strdup(mpool_t * __restrict mp, const char
  * @memname = Memory name   * @memname = Memory name
  * return: NULL error or not found and !=NULL allocated memory    * return: NULL error or not found and !=NULL allocated memory 
  */   */
inline struct tagAlloc *mpool_getmembynam(mpool_t * __restrict mp, unsigned int size, const char *memname);struct tagAlloc *mpool_getmembynam(mpool_t * __restrict mp, unsigned int size, const char *memname);
 /*  /*
  * mpool_getsizebyaddr() - Get size of allocated memory block by address   * mpool_getsizebyaddr() - Get size of allocated memory block by address
  *   *
  * @data = allocated memory from mpool_malloc()   * @data = allocated memory from mpool_malloc()
  * return: usable size of allocated memory block   * return: usable size of allocated memory block
  */   */
inline unsigned int mpool_getsizebyaddr(void * __restrict data);unsigned int mpool_getsizebyaddr(void * __restrict data);
 /*  /*
  * mpool_chkaddr() - Check validity of given address   * mpool_chkaddr() - Check validity of given address
  *   *
  * @data = allocated memory from mpool_malloc()   * @data = allocated memory from mpool_malloc()
  * return: -1 bad address, 1 corrupted address or 0 ok   * return: -1 bad address, 1 corrupted address or 0 ok
  */   */
inline int mpool_chkaddr(void * __restrict data);int mpool_chkaddr(void * __restrict data);
 /*  /*
  * mpool_setquota() - Change maximum memory quota   * mpool_setquota() - Change maximum memory quota
  *   *
Line 193  inline int mpool_chkaddr(void * __restrict data); Line 194  inline int mpool_chkaddr(void * __restrict data);
  * @maxmem = New max quota size   * @maxmem = New max quota size
  * return: old maximum memory quota size   * return: old maximum memory quota size
  */   */
inline unsigned long mpool_setquota(mpool_t * __restrict mp, unsigned long maxmem);unsigned long mpool_setquota(mpool_t * __restrict mp, unsigned long maxmem);
 /*  /*
  * mpool_getquota() - Get memory quota   * mpool_getquota() - Get memory quota
  *   *
  * @mp = Memory pool   * @mp = Memory pool
 * @currmem = Return current memory * @currmem = Return current memory usage
  * @realmem = Return current real memory usage
  * @maxmem = Return max quota size   * @maxmem = Return max quota size
  * return: none   * return: none
  */   */
inline void mpool_getquota(mpool_t * __restrict mp, unsigned long *currmem, 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   * mpool_statistics() - Dump statistics from memory pool buckets
  *   *
Line 253  void mpool_xfree(void * __restrict data); Line 255  void mpool_xfree(void * __restrict data);
  * return: =NULL error or !=NULL new allocated string   * return: =NULL error or !=NULL new allocated string
  */   */
 char *mpool_xstrdup(const char *str);  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_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_dump(mpool_t * __restrict mp, const char *fmt, ...);
   
   
 #endif  #endif

Removed from v.1.1  
changed lines
  Added in v.1.4.2.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>