]> granicus.if.org Git - python/commitdiff
Malloc debugging now flagged with USE_MALLOC_DEBUG
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 23 Oct 1996 15:46:57 +0000 (15:46 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 23 Oct 1996 15:46:57 +0000 (15:46 +0000)
Mac/Modules/macmodule.c
Mac/mwerks/malloc/malloc.c

index 4c856fcb5158ee3bccadf41ba0d8019f4ba63c98..4231346e401671fe9b7e8b7a03c546472862d204 100644 (file)
@@ -67,9 +67,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #endif
 
 /* Optional routines, for some compiler/runtime combinations */
-#if defined(__MWERKS__) && defined(__powerc)
-#define MALLOC_DEBUG
-#endif
 #if defined(USE_GUSI) || !defined(__MWERKS__)
 #define WEHAVE_FDOPEN
 #endif
@@ -581,7 +578,7 @@ mac_write(self, args)
        return newintobject((long)size);
 }
 
-#ifdef MALLOC_DEBUG
+#ifdef USE_MALLOC_DEBUG
 static object *
 mac_mstats(self, args)
        object*self;
@@ -591,7 +588,7 @@ mac_mstats(self, args)
        INCREF(None);
        return None;
 }
-#endif MALLOC_DEBUG
+#endif USE_MALLOC_DEBUG
 
 static struct methodlist mac_methods[] = {
        {"chdir",       mac_chdir},
@@ -617,7 +614,7 @@ static struct methodlist mac_methods[] = {
        {"remove",      mac_unlink},
        {"unlink",      mac_unlink},
        {"write",       mac_write},
-#ifdef MALLOC_DEBUG
+#ifdef USE_MALLOC_DEBUG
        {"mstats",      mac_mstats},
 #endif
 
index 897d500cb51b31a4a9bb374d861c9889be0958c6..5178b6698ef576148380d1360e391595c42f81c9 100644 (file)
@@ -52,12 +52,14 @@ static char *rcsid = "$Id$";
  * 
  */
  
-
+#ifdef USE_MALLOC_DEBUG
+/* You may also selectively enable some of these (but some are interdependent) */
 #define DEBUG
 #define DEBUG2
 #define MSTATS
 #define RCHECK
 #define VCHECK
+#endif /* USE_MALLOC_DEBUG */
 
 typedef unsigned char u_char;
 typedef unsigned long u_long;