gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r3651 - branches/GNUnet-0.7.0/src/util


From: durner
Subject: [GNUnet-SVN] r3651 - branches/GNUnet-0.7.0/src/util
Date: Sun, 5 Nov 2006 06:09:24 -0800 (PST)

Author: durner
Date: 2006-11-05 06:09:18 -0800 (Sun, 05 Nov 2006)
New Revision: 3651

Modified:
   branches/GNUnet-0.7.0/src/util/dlmalloc.c
   branches/GNUnet-0.7.0/src/util/xmalloc.c
Log:
overload malloc() & co

Modified: branches/GNUnet-0.7.0/src/util/dlmalloc.c
===================================================================
--- branches/GNUnet-0.7.0/src/util/dlmalloc.c   2006-11-05 06:36:48 UTC (rev 
3650)
+++ branches/GNUnet-0.7.0/src/util/dlmalloc.c   2006-11-05 14:09:18 UTC (rev 
3651)
@@ -13,7 +13,7 @@
 #endif
 
 #define USE_LOCKS 1
-#define USE_DL_PREFIX 1
+#define USE_DL_PREFIX 0
 
 /* END changes */
 

Modified: branches/GNUnet-0.7.0/src/util/xmalloc.c
===================================================================
--- branches/GNUnet-0.7.0/src/util/xmalloc.c    2006-11-05 06:36:48 UTC (rev 
3650)
+++ branches/GNUnet-0.7.0/src/util/xmalloc.c    2006-11-05 14:09:18 UTC (rev 
3651)
@@ -28,8 +28,6 @@
 #include "platform.h"
 #include "dlmalloc.h"
 
-/* #define USE_DLMALLOC */
-
 #ifndef INT_MAX
 #define INT_MAX 0x7FFFFFFF
 #endif
@@ -63,11 +61,9 @@
   void * result;
 
   GNUNET_ASSERT(size < INT_MAX);
-#ifdef USE_DLMALLOC
-  result = dlmalloc(size);
-#else
+
   result = malloc(size);
-#endif
+
   if (result == NULL)
     DIE_STRERROR_FL(filename, linenumber, "malloc");
   memset(result, 0, size); /* client code should not rely on this, though... */
@@ -90,11 +86,9 @@
                 const size_t n,
                 const char * filename,
                 const int linenumber) {
-#ifdef USE_DLMALLOC
-  ptr = dlrealloc(ptr, n);
-#else
+
   ptr = realloc(ptr, n);
-#endif
+
   if (!ptr)
     DIE_STRERROR_FL(filename, linenumber, "realloc");
   return ptr;
@@ -113,11 +107,8 @@
            const int linenumber) {
   GNUNET_ASSERT_FL(ptr != NULL,
                   filename, linenumber);
-#ifdef USE_DLMALLOC
-  dlfree(ptr);
-#else
+
   free(ptr);
-#endif
 }
 
 /**





reply via email to

[Prev in Thread] Current Thread [Next in Thread]