mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-28 02:57:05 +08:00
Added mem_calloc().
This commit is contained in:
@@ -500,4 +500,15 @@ mem_malloc(mem_size_t size)
|
||||
}
|
||||
|
||||
#endif /* MEM_USE_POOLS */
|
||||
|
||||
void *mem_calloc(size_t count, size_t size)
|
||||
{
|
||||
void *p;
|
||||
|
||||
p = mem_malloc(count * size);
|
||||
if(p) {
|
||||
memset(p, 0, count * size);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
#endif /* !MEM_LIBC_MALLOC */
|
||||
|
||||
Reference in New Issue
Block a user