minilibc: only define malloc family when RT_USING_HEAP enabled

This commit is contained in:
Grissiom 2014-10-14 16:14:02 +08:00
parent 9a75583349
commit e030451220
1 changed files with 2 additions and 0 deletions

View File

@ -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)
{ {
return rt_calloc(nelem, elsize); return rt_calloc(nelem, elsize);
} }
#endif
#endif #endif