Diff for /libelwix/src/mem.c between versions 1.1 and 1.2

version 1.1, 2013/01/17 10:05:35 version 1.2, 2013/05/30 09:07:33
Line 544  mpool_strdup(mpool_t * __restrict mp, const char *str, Line 544  mpool_strdup(mpool_t * __restrict mp, const char *str,
  * @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 *struct tagAlloc *
 mpool_getmembynam(mpool_t * __restrict mp, u_int size, const char *memname)  mpool_getmembynam(mpool_t * __restrict mp, u_int size, const char *memname)
 {  {
         int idx;          int idx;
Line 567  mpool_getmembynam(mpool_t * __restrict mp, u_int size, Line 567  mpool_getmembynam(mpool_t * __restrict mp, u_int size,
  * @addr = allocated memory from mpool_malloc()   * @addr = allocated memory from mpool_malloc()
  * return: usable size of allocated memory block   * return: usable size of allocated memory block
  */   */
inline u_intu_int
 mpool_getsizebyaddr(void * __restrict data)  mpool_getsizebyaddr(void * __restrict data)
 {  {
         if (mpool_chkaddr(data))          if (mpool_chkaddr(data))
Line 582  mpool_getsizebyaddr(void * __restrict data) Line 582  mpool_getsizebyaddr(void * __restrict data)
  * @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 intint
 mpool_chkaddr(void * __restrict data)  mpool_chkaddr(void * __restrict data)
 {  {
         /* check address range */          /* check address range */
Line 602  mpool_chkaddr(void * __restrict data) Line 602  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 u_longu_long
 mpool_setquota(mpool_t * __restrict mp, u_long maxmem)  mpool_setquota(mpool_t * __restrict mp, u_long maxmem)
 {  {
         u_long ret;          u_long ret;
Line 630  mpool_setquota(mpool_t * __restrict mp, u_long maxmem) Line 630  mpool_setquota(mpool_t * __restrict mp, u_long maxmem)
  * @maxmem = Return max quota size   * @maxmem = Return max quota size
  * return: none   * return: none
  */   */
inline voidvoid
 mpool_getquota(mpool_t * __restrict mp, u_long *currmem, u_long *maxmem)  mpool_getquota(mpool_t * __restrict mp, u_long *currmem, u_long *maxmem)
 {  {
         if (!mp)          if (!mp)

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


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