2012-11-23 11:26:09 +08:00
|
|
|
/*
|
|
|
|
* File: mem_std.c
|
|
|
|
* Brief: Replace memory management functions of arm standard c library
|
|
|
|
*
|
|
|
|
*/
|
2012-11-22 11:39:22 +08:00
|
|
|
|
|
|
|
#include "rtthread.h"
|
|
|
|
|
2012-11-23 11:26:09 +08:00
|
|
|
/* avoid the heap and heap-using library functions supplied by arm */
|
2012-11-22 11:39:22 +08:00
|
|
|
#pragma import(__use_no_heap)
|
|
|
|
|
|
|
|
void * malloc(int n)
|
|
|
|
{
|
|
|
|
return rt_malloc(n);
|
|
|
|
}
|
|
|
|
|
|
|
|
void * realloc(void *rmem, rt_size_t newsize)
|
|
|
|
{
|
|
|
|
return rt_realloc(rmem, newsize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void free(void *rmem)
|
|
|
|
{
|
|
|
|
rt_free(rmem);
|
|
|
|
}
|