mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 17:18:24 +00:00
add malloc, realloc etc implementation in minilibc.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1452 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -38,4 +38,24 @@ int atoi(const char* s)
|
||||
return sign==-1?-v:v;
|
||||
}
|
||||
|
||||
void *malloc(size_t size)
|
||||
{
|
||||
return rt_malloc(size);
|
||||
}
|
||||
|
||||
void free(void *ptr)
|
||||
{
|
||||
rt_free(ptr);
|
||||
}
|
||||
|
||||
void *realloc(void *ptr, size_t size)
|
||||
{
|
||||
return rt_realloc(ptr, size);
|
||||
}
|
||||
|
||||
void *calloc(size_t nelem, size_t elsize)
|
||||
{
|
||||
return rt_calloc(nelem, elsize);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user