2018-09-11 09:44:12 +08:00
|
|
|
set(COMPONENT_SRCS "heap_caps.c"
|
|
|
|
"heap_caps_init.c"
|
|
|
|
"heap_trace.c"
|
|
|
|
"multi_heap.c")
|
2018-01-12 13:49:13 +11:00
|
|
|
|
|
|
|
if(NOT CONFIG_HEAP_POISONING_DISABLED)
|
2018-09-13 08:56:59 +08:00
|
|
|
list(APPEND COMPONENT_SRCS "multi_heap_poisoning.c")
|
2018-01-12 13:49:13 +11:00
|
|
|
endif()
|
|
|
|
|
2018-01-19 16:22:08 +11:00
|
|
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
|
|
|
|
2018-03-22 17:27:10 +11:00
|
|
|
set(COMPONENT_REQUIRES "")
|
|
|
|
|
2018-01-12 13:49:13 +11:00
|
|
|
register_component()
|
|
|
|
|
|
|
|
if(CONFIG_HEAP_TRACING)
|
2018-02-27 15:45:30 +11:00
|
|
|
set(WRAP_FUNCTIONS
|
2018-05-01 16:54:27 +10:00
|
|
|
calloc
|
|
|
|
malloc
|
|
|
|
free
|
|
|
|
realloc
|
|
|
|
heap_caps_malloc
|
|
|
|
heap_caps_free
|
|
|
|
heap_caps_realloc
|
|
|
|
heap_caps_malloc_default
|
|
|
|
heap_caps_realloc_default)
|
2018-01-12 13:49:13 +11:00
|
|
|
|
2018-02-27 15:45:30 +11:00
|
|
|
foreach(wrap ${WRAP_FUNCTIONS})
|
|
|
|
target_link_libraries(heap "-Wl,--wrap=${wrap}")
|
|
|
|
endforeach()
|
2018-01-12 13:49:13 +11:00
|
|
|
|
2018-02-27 15:45:30 +11:00
|
|
|
endif()
|