Use the bin allocator only on targets without SDRAM

The bin allocator causes random alignment issues on these targets
This commit is contained in:
Raphael Coeffic
2021-05-29 13:31:50 +02:00
committed by Raphael Coeffic
parent 08fd8a331d
commit 0eb2d0914c
2 changed files with 10 additions and 3 deletions
+9 -3
View File
@@ -544,9 +544,15 @@ if(NOT MSVC)
# Lua needs %g and %f
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -u _printf_float -u _scanf_float")
endif()
# Nano's malloc does work well with lua, use our own
add_definitions(-DUSE_BIN_ALLOCATOR)
set(SRC ${SRC} bin_allocator.cpp)
if(SDRAM)
# Target with SDRAM do not need a custom allocator for now
# as the custom allocator has alignement issues
message("Target has SDRAM, do not use BIN_ALLOCATOR")
else()
# Nano's malloc does work well with lua, use our own
add_definitions(-DUSE_BIN_ALLOCATOR)
set(SRC ${SRC} bin_allocator.cpp)
endif()
endif()
if(OPENRC_BOOTLOADER)