Files
TencentOS-tiny/components/ai/onnx/platflorm/imx6ull/tencentos_libc_malloc.c
2021-09-06 21:50:44 +08:00

26 lines
441 B
C

#include "tos_k.h"
#ifdef __CC_ARM
/* avoid the heap and heap-using library functions supplied by arm */
#pragma import(__use_no_heap)
#endif
void *malloc(size_t n)
{
return tos_mmheap_alloc(n);
}
void *realloc(void *rmem, size_t newsize)
{
return tos_mmheap_realloc(rmem, newsize);
}
void *calloc(size_t nelem, size_t elsize)
{
return tos_mmheap_calloc(nelem, elsize);
}
void free(void *rmem)
{
tos_mmheap_free(rmem);
}