mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
make the Z_Malloc zone checking depend on developer
This commit is contained in:
parent
d1a7649ba0
commit
ff2b08b2fd
1 changed files with 4 additions and 2 deletions
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
#include "QF/cmd.h"
|
#include "QF/cmd.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
|
#include "QF/cvar.h"
|
||||||
#include "QF/qargs.h"
|
#include "QF/qargs.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
#include "QF/zone.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 *Z_Malloc (memzone_t *zone, int size)
|
||||||
{
|
{
|
||||||
void *buf;
|
void *buf;
|
||||||
|
|
||||||
Z_CheckHeap (zone); // DEBUG
|
if (!developer || developer->int_val)
|
||||||
|
Z_CheckHeap (zone); // DEBUG
|
||||||
buf = Z_TagMalloc (zone, size, 1);
|
buf = Z_TagMalloc (zone, size, 1);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
Sys_Error ("Z_Malloc: failed on allocation of %i bytes",size);
|
Sys_Error ("Z_Malloc: failed on allocation of %i bytes",size);
|
||||||
|
|
Loading…
Reference in a new issue