mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 17:18:24 +00:00
minilibc: only define malloc family when RT_USING_HEAP enabled
This commit is contained in:
@@ -54,6 +54,7 @@ long int atol(const char* s)
|
||||
return sign?-v:v;
|
||||
}
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
void *malloc(size_t size)
|
||||
{
|
||||
return rt_malloc(size);
|
||||
@@ -73,5 +74,6 @@ void *calloc(size_t nelem, size_t elsize)
|
||||
{
|
||||
return rt_calloc(nelem, elsize);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user