return ptr;
}
-void system_free( void * ptr ){
- static void (*freep)(void *);
- char *error;
-
- /* get address of libc free */
- if (!freep) {
- freep = ( void ( * )( void * ) )dlsym(RTLD_NEXT, "free");
- if ((error = dlerror()) != NULL) {
- fputs(error, stderr);
- exit(EXIT_FAILURE);
- }
- }
- freep(ptr);
-}
-
/** Non-snapshotting free for our use. */
void model_free(void *ptr) {
#if USE_MPROTECT_SNAPSHOT
/** @brief Global mspace reference for the snapshotting heap */
mspace mySpace = NULL;
-/** @brief Global reference to the unaligned memory address that was malloc'd
- * for the snapshotting heap */
-void *basemySpace = NULL;
-
/** Bootstrap allocation. Problem is that the dynamic linker calls
* require calloc to work and calloc requires the dynamic linker to
* work. */