mymemory: kill system_free()
[c11tester.git] / mymemory.cc
index 95459be561af6b7bab74d50610d470f1005c4464..5cb06a4f834e72a1be7f578c0e41c76d70f06aad 100644 (file)
@@ -103,21 +103,6 @@ void *system_malloc( size_t size ){
        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
@@ -142,10 +127,6 @@ void model_free(void *ptr) {
 /** @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.  */