提交 e0304512 编写于 作者: G Grissiom

minilibc: only define malloc family when RT_USING_HEAP enabled

上级 9a755833
...@@ -54,6 +54,7 @@ long int atol(const char* s) ...@@ -54,6 +54,7 @@ long int atol(const char* s)
return sign?-v:v; return sign?-v:v;
} }
#ifdef RT_USING_HEAP
void *malloc(size_t size) void *malloc(size_t size)
{ {
return rt_malloc(size); return rt_malloc(size);
...@@ -73,5 +74,6 @@ void *calloc(size_t nelem, size_t elsize) ...@@ -73,5 +74,6 @@ void *calloc(size_t nelem, size_t elsize)
{ {
return rt_calloc(nelem, elsize); return rt_calloc(nelem, elsize);
} }
#endif
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册