Added mem_calloc().

This commit is contained in:
marcbou
2007-08-16 18:37:15 +00:00
parent 0b4402ebc8
commit 95cbf95c50
2 changed files with 15 additions and 0 deletions

View File

@@ -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 */