trunk/src/emu/emualloc.c
| r23632 | r23633 | |
| 150 | 150 | // add a new entry |
| 151 | 151 | memory_entry::allocate(size, result, file, line); |
| 152 | 152 | |
| 153 | | #ifdef MAME_DEBUG |
| 153 | #if !defined(NO_MEMORY_INITIALIZATION) && defined(MAME_DEBUG) |
| 154 | 154 | memset(result, 0xdd, size); |
| 155 | 155 | #endif |
| 156 | 156 | |
| r23632 | r23633 | |
| 174 | 174 | // add a new entry |
| 175 | 175 | memory_entry::allocate(size, result, file, line); |
| 176 | 176 | |
| 177 | | #ifdef MAME_DEBUG |
| 177 | #if !defined(NO_MEMORY_INITIALIZATION) && defined(MAME_DEBUG) |
| 178 | 178 | memset(result, 0xdd, size); |
| 179 | 179 | #endif |
| 180 | 180 | |
trunk/makefile
| r23632 | r23633 | |
| 440 | 440 | DEFS += -DUSE_SYSTEM_JPEGLIB |
| 441 | 441 | endif |
| 442 | 442 | |
| 443 | # disable initialization of memory in malloc overload |
| 444 | ifdef SANITIZE |
| 445 | ifneq (,$(findstring memory,$(SANITIZE))) |
| 446 | DEFS += -DNO_MEMORY_INITIALIZATION |
| 447 | endif |
| 448 | endif |
| 443 | 449 | |
| 444 | 450 | |
| 445 | 451 | #------------------------------------------------- |
| r23632 | r23633 | |
| 536 | 542 | ifneq (,$(findstring thread,$(SANITIZE))) |
| 537 | 543 | CCOMFLAGS += -fPIE |
| 538 | 544 | endif |
| 545 | ifneq (,$(findstring memory,$(SANITIZE))) |
| 546 | ifneq (,$(findstring clang,$(CC))) |
| 547 | CCOMFLAGS += -fsanitize-memory-track-origins |
| 539 | 548 | endif |
| 549 | endif |
| 550 | endif |
| 540 | 551 | |
| 541 | 552 | #------------------------------------------------- |
| 542 | 553 | # include paths |