Ignore:
Timestamp:
Jan 25, 2007, 8:55:20 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Crap! Fixed memory manager initialisation. And sticking that into the 0.6.1 tarball, no one will notice! (ha ha ha)
File:
1 edited

Legend:

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

    r1699 r1714  
    103103#define DUMMY_STOP ((uintptr_t)dummy_buffer + DUMMY_BYTES)
    104104
     105void _zz_mem_init(void)
     106{
     107    LOADSYM(calloc);
     108    LOADSYM(malloc);
     109    LOADSYM(realloc);
     110}
     111
    105112void *NEW(calloc)(size_t nmemb, size_t size)
    106113{
     
    145152{
    146153    void *ret;
    147     if((uintptr_t)ptr >= DUMMY_START && (uintptr_t)ptr < DUMMY_STOP)
     154    if(!ORIG(realloc)
     155        || ((uintptr_t)ptr >= DUMMY_START && (uintptr_t)ptr < DUMMY_STOP))
    148156    {
    149157        ret = dummy_buffer + dummy_offset;
Note: See TracChangeset for help on using the changeset viewer.