Changes between Version 1 and Version 2 of zzuf/internals
- Timestamp:
- 11/22/2009 05:18:50 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
zzuf/internals
v1 v2 33 33 #!c 34 34 #include <malloc.h> 35 35 36 #include "libzzuf.h" 36 37 #include "lib-load.h" … … 56 57 }}} 57 58 59 == Memory functions == 60 61 Functions such as '''`malloc`''' need to be diverted by zzuf in order to monitor global memory usage and detect severe memory leaks. 62 63 This creates a bootstrapping problem on some platforms: the diverted '''`calloc`''' calls the real '''`calloc`''', which needs to be loaded using '''`dlsym`'''. On Linux, '''`dlsym`''' calls '''`calloc`''', resulting in an infinite loop. To avoid this, we declare a private static buffer that memory allocation functions can use if the original function is not yet loaded. 64 58 65 === Standard file descriptor functions === 59 66