diff --git a/bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib/include/metal/system/generic/alloc.h b/bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib/include/metal/system/generic/alloc.h index bcceba61a0..5220e13b97 100644 --- a/bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib/include/metal/system/generic/alloc.h +++ b/bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib/include/metal/system/generic/alloc.h @@ -18,18 +18,21 @@ #include +extern void *rt_malloc(unsigned long nbytes); +extern void rt_free(void *ptr); + #ifdef __cplusplus extern "C" { #endif static inline void *metal_allocate_memory(unsigned int size) { - return (malloc(size)); + return (rt_malloc(size)); } static inline void metal_free_memory(void *ptr) { - free(ptr); + rt_free(ptr); } #ifdef __cplusplus diff --git a/bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib/system/generic/alloc.h b/bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib/system/generic/alloc.h index bcceba61a0..5220e13b97 100644 --- a/bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib/system/generic/alloc.h +++ b/bsp/stm32/stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib/system/generic/alloc.h @@ -18,18 +18,21 @@ #include +extern void *rt_malloc(unsigned long nbytes); +extern void rt_free(void *ptr); + #ifdef __cplusplus extern "C" { #endif static inline void *metal_allocate_memory(unsigned int size) { - return (malloc(size)); + return (rt_malloc(size)); } static inline void metal_free_memory(void *ptr) { - free(ptr); + rt_free(ptr); } #ifdef __cplusplus diff --git a/bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib/include/metal/system/generic/alloc.h b/bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib/include/metal/system/generic/alloc.h index bcceba61a0..5220e13b97 100644 --- a/bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib/include/metal/system/generic/alloc.h +++ b/bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib/include/metal/system/generic/alloc.h @@ -18,18 +18,21 @@ #include +extern void *rt_malloc(unsigned long nbytes); +extern void rt_free(void *ptr); + #ifdef __cplusplus extern "C" { #endif static inline void *metal_allocate_memory(unsigned int size) { - return (malloc(size)); + return (rt_malloc(size)); } static inline void metal_free_memory(void *ptr) { - free(ptr); + rt_free(ptr); } #ifdef __cplusplus diff --git a/bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib/system/generic/alloc.h b/bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib/system/generic/alloc.h index bcceba61a0..5220e13b97 100644 --- a/bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib/system/generic/alloc.h +++ b/bsp/stm32/stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib/system/generic/alloc.h @@ -18,18 +18,21 @@ #include +extern void *rt_malloc(unsigned long nbytes); +extern void rt_free(void *ptr); + #ifdef __cplusplus extern "C" { #endif static inline void *metal_allocate_memory(unsigned int size) { - return (malloc(size)); + return (rt_malloc(size)); } static inline void metal_free_memory(void *ptr) { - free(ptr); + rt_free(ptr); } #ifdef __cplusplus