Disable memory clears for both retail and debug builds to prevent broken mesh pointers

This commit is contained in:
Rafael Brune
2024-05-29 22:30:37 +02:00
parent 93917c4347
commit 82c02ef6f0
2 changed files with 5 additions and 2 deletions

View File

@ -1103,6 +1103,9 @@ noMoreFree:;
else
{
#if MEM_CLEAR_MEM //clear the new block
// Note: When compiling with MEM_CLEAR_MEM this following clear will
// cause broken mesh pointers and crash the game in some circumstances.
// Hence we disable the MEM_CLEAR_MEM for both retail and debug builds for now.
memClearDword(newPointer, memClearSetting, length / sizeof(udword));
#endif
}

View File

@ -41,8 +41,8 @@
#define MEM_MODULE_TEST 0 //don't test the module
#define MEM_ERROR_CHECKING 0 //no error ckecking in retail
#define MEM_CLEAR_MEM 1 // clear newly allocated blocks to all clear code
#define MEM_CLEAR_MEM_ON_FREE 1 // clear newly freed blocks to all clear code
#define MEM_CLEAR_MEM 0 // clear newly allocated blocks to all clear code
#define MEM_CLEAR_MEM_ON_FREE 0 // clear newly freed blocks to all clear code
#define MEM_VERBOSE_LEVEL 0 //don't print any verbose strings in retail
#define MEM_USE_NAMES 0 //no names please ma'am
#define MEM_DEFRAGMENT_FREE 1 //attempt to join with adjacent free block(s) when freeing