Merge pull request #1637 from liangyongxiang/heap

[libc] fix compilation error when RT_USING_HEAP is disable
This commit is contained in:
Bernard Xiong 2018-07-17 20:41:31 +08:00 committed by GitHub
commit 414bd03063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@
#include "rtthread.h"
#ifdef RT_USING_HEAP
/* avoid the heap and heap-using library functions supplied by arm */
#pragma import(__use_no_heap)
@ -41,3 +42,4 @@ void free(void *rmem)
rt_free(rmem);
}
RTM_EXPORT(free);
#endif

View File

@ -23,6 +23,7 @@
*/
#include <rtthread.h>
#ifdef RT_USING_HEAP
void *malloc(rt_size_t n)
{
return rt_malloc(n);
@ -42,3 +43,4 @@ void free(void *rmem)
{
rt_free(rmem);
}
#endif