mymemory: kill system_malloc()
authorBrian Norris <banorris@uci.edu>
Mon, 8 Oct 2012 20:11:13 +0000 (13:11 -0700)
committerBrian Norris <banorris@uci.edu>
Mon, 8 Oct 2012 20:11:46 +0000 (13:11 -0700)
Not needed

mymemory.cc
mymemory.h

index c076f5449c5a2f8e70c5ae7ef48ade0733937b5c..cdfa37282870e6e1d1665be7cea00d856a0a2b42 100644 (file)
@@ -88,24 +88,6 @@ void snapshot_free(void *ptr)
        free(ptr);
 }
 
-void *system_malloc(size_t size)
-{
-       static void *(*mallocp)(size_t size);
-       char *error;
-       void *ptr;
-
-       /* get address of libc malloc */
-       if (!mallocp) {
-               mallocp = (void * (*)(size_t))dlsym(RTLD_NEXT, "malloc");
-               if ((error = dlerror()) != NULL) {
-                       fputs(error, stderr);
-                       exit(EXIT_FAILURE);
-               }
-       }
-       ptr = mallocp(size);
-       return ptr;
-}
-
 /** Non-snapshotting free for our use. */
 void model_free(void *ptr)
 {
index 0e274d2fa4cacc47c2ecdd557a4ae88f7e17b883..85679a1787dc74f638d4a7ba023fc9ae75e8415b 100644 (file)
@@ -49,8 +49,6 @@ void * snapshot_malloc(size_t size);
 void * snapshot_calloc(size_t count, size_t size);
 void snapshot_free(void *ptr);
 
-void *system_malloc(size_t size );
-
 /** @brief Provides a non-snapshotting allocator for use in STL classes.
  *
  * The code was adapted from a code example from the book The C++