From ff2b08b2fddceb513de4060b9161c0de5520731b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 28 Aug 2001 06:15:58 +0000 Subject: [PATCH] make the Z_Malloc zone checking depend on developer --- libs/util/zone.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/util/zone.c b/libs/util/zone.c index a118de48e..ff8e0ade8 100644 --- a/libs/util/zone.c +++ b/libs/util/zone.c @@ -40,6 +40,7 @@ #include "QF/cmd.h" #include "QF/console.h" +#include "QF/cvar.h" #include "QF/qargs.h" #include "QF/sys.h" #include "QF/zone.h" @@ -143,8 +144,9 @@ void Z_Free (memzone_t *zone, void *ptr) void *Z_Malloc (memzone_t *zone, int size) { void *buf; - -Z_CheckHeap (zone); // DEBUG + + if (!developer || developer->int_val) + Z_CheckHeap (zone); // DEBUG buf = Z_TagMalloc (zone, size, 1); if (!buf) Sys_Error ("Z_Malloc: failed on allocation of %i bytes",size);