rt-thread/components/libc/compilers/armlibc/mem_std.c

43 lines
694 B
C
Raw Normal View History

/*
2018-10-14 19:28:18 +08:00
* Copyright (c) 2006-2018, RT-Thread Development Team
*
2018-10-14 19:28:18 +08:00
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* 2014-08-03 bernard Add file header.
*/
#include "rtthread.h"
#ifdef RT_USING_HEAP
2018-09-23 12:08:44 +08:00
#ifdef __CC_ARM
/* avoid the heap and heap-using library functions supplied by arm */
#pragma import(__use_no_heap)
2018-09-23 12:08:44 +08:00
#endif
void *malloc(size_t n)
{
return rt_malloc(n);
}
2015-10-11 15:37:34 +08:00
RTM_EXPORT(malloc);
void *realloc(void *rmem, size_t newsize)
{
return rt_realloc(rmem, newsize);
}
2015-10-11 15:37:34 +08:00
RTM_EXPORT(realloc);
void *calloc(size_t nelem, size_t elsize)
{
return rt_calloc(nelem, elsize);
}
2015-10-11 15:37:34 +08:00
RTM_EXPORT(calloc);
void free(void *rmem)
{
rt_free(rmem);
}
2015-10-11 15:37:34 +08:00
RTM_EXPORT(free);
#endif