Ignore:
Timestamp:
Jan 25, 2007, 10:43:37 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Put a few debug messages in malloc-related functions when they use our custom buffer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/lib-mem.c

    r1714 r1716  
    118118        memset(ret, 0, (nmemb * size + 7) / 8);
    119119        dummy_offset += (nmemb * size + 7) / 8;
     120        debug("%s(%li, %li) = %p", __func__,
     121              (long int)nmemb, (long int)size, ret);
    120122        return ret;
    121123    }
     
    133135        ret = dummy_buffer + dummy_offset;
    134136        dummy_offset += (size + 7) / 8;
     137        debug("%s(%li) = %p", __func__, (long int)size, ret);
    135138        return ret;
    136139    }
     
    144147{
    145148    if((uintptr_t)ptr >= DUMMY_START && (uintptr_t)ptr < DUMMY_STOP)
     149    {
     150        debug("%s(%p)", __func__, ptr);
    146151        return;
     152    }
    147153    LOADSYM(free);
    148154    ORIG(free)(ptr);
     
    158164        memcpy(ret, ptr, size);
    159165        dummy_offset += (size + 7) * 8;
     166        debug("%s(%p, %li) = %p", __func__, ptr, (long int)size, ret);
    160167        return ret;
    161168    }
Note: See TracChangeset for help on using the changeset viewer.