Merge pull request #1795 from liruncong/armlibc

armlibc下malloc/realloc/calloc函数声明同一更正
This commit is contained in:
Bernard Xiong 2018-09-11 20:52:08 +08:00 committed by GitHub
commit b1bbf434a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -19,19 +19,19 @@
/* avoid the heap and heap-using library functions supplied by arm */ /* avoid the heap and heap-using library functions supplied by arm */
#pragma import(__use_no_heap) #pragma import(__use_no_heap)
void *malloc(int n) void *malloc(size_t n)
{ {
return rt_malloc(n); return rt_malloc(n);
} }
RTM_EXPORT(malloc); RTM_EXPORT(malloc);
void *realloc(void *rmem, rt_size_t newsize) void *realloc(void *rmem, size_t newsize)
{ {
return rt_realloc(rmem, newsize); return rt_realloc(rmem, newsize);
} }
RTM_EXPORT(realloc); RTM_EXPORT(realloc);
void *calloc(rt_size_t nelem, rt_size_t elsize) void *calloc(size_t nelem, size_t elsize)
{ {
return rt_calloc(nelem, elsize); return rt_calloc(nelem, elsize);
} }