Skip to content

Commit 62719fd

Browse files
authored
[CMAKE] Disable game memory if ASAN is enabled (#833)
1 parent 0e1bc63 commit 62719fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/config-memory.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Game Memory features
22
option(RTS_GAMEMEMORY_ENABLE "Enables the memory pool and dynamic memory allocator." ON)
33

4+
# Disable Game Memory if ASAN is enabled - Game Memory overrides new/delete and interferes with ASAN
5+
if(RTS_BUILD_OPTION_ASAN)
6+
set(RTS_GAMEMEMORY_ENABLE OFF)
7+
endif()
8+
49
# Memory pool features
510
option(RTS_MEMORYPOOL_OVERRIDE_MALLOC "Enables the Dynamic Memory Allocator for malloc calls." OFF)
611
option(RTS_MEMORYPOOL_MPSB_DLINK "Adds a backlink to MemoryPoolSingleBlock. Makes it faster to free raw DMA blocks, but increases memory consumption." ON)

0 commit comments

Comments
 (0)