Changeset 1714 for zzuf


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)
Location:
zzuf/trunk/src
Files:
3 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;
  • zzuf/trunk/src/libzzuf.c

    r1705 r1714  
    112112
    113113    _zz_fd_init();
     114    _zz_mem_init();
    114115    _zz_sys_init();
    115116
  • zzuf/trunk/src/libzzuf.h

    r1701 r1714  
    5454extern int _zz_autoinc;
    5555
     56/* This function is needed to initialise memory functions */
     57extern void _zz_mem_init(void);
     58
Note: See TracChangeset for help on using the changeset viewer.