Don't replace Z_Malloc, Z_TagMalloc and Z_Free in debug memory mode

This commit is contained in:
smallmodel 2023-09-07 19:48:08 +02:00
parent bed2f15a72
commit 36aa9bd802
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
3 changed files with 0 additions and 18 deletions

View file

@ -78,8 +78,6 @@ const char *Z_NumberStringPointer( int iNum )
return ( const char * )numberstring[ iNum - '0' ].mem;
}
#ifndef _DEBUG_MEM
/*
========================
Z_Free
@ -114,8 +112,6 @@ void Z_Free( void *ptr )
free( block );
}
#endif
/*
========================
Z_FreeTags
@ -136,8 +132,6 @@ void Z_FreeTags( int tag )
mem_blocks[ tag ].next = &mem_blocks[ tag ];
}
#ifndef _DEBUG_MEM
/*
========================
Z_TagMalloc
@ -180,8 +174,6 @@ void *Z_TagMalloc( int size, int tag )
return ( void * )( ( byte * )block + sizeof( memblock_t ) );
}
#endif
/*
========================
Z_CheckHeap
@ -486,8 +478,6 @@ Com_InitHunkZoneMemory
void Com_InitHunkMemory( void ) {
}
#ifndef _DEBUG_MEM
/*
========================
Z_Malloc
@ -501,5 +491,3 @@ void *Z_Malloc( int size ) {
return ptr;
}
#endif

View file

@ -155,10 +155,6 @@ extern "C" {
# include <stdlib.h>
# include <crtdbg.h>
# endif
#define Z_Malloc malloc
#define Z_TagMalloc(size, tag) malloc( size )
#define Z_Free(ptr) free(ptr)
#endif
#include <assert.h>

View file

@ -1050,11 +1050,9 @@ temp file loading
const char *Z_EmptyStringPointer( void );
const char *Z_NumberStringPointer( int iNum );
#ifndef _DEBUG_MEM
void *Z_TagMalloc(int size, int tag );
void *Z_Malloc(int size );
void Z_Free( void *ptr );
#endif
void Z_FreeTags( int tag );