Add calloc to libc
This commit is contained in:
parent
febc7b7997
commit
e261ccdcec
@ -12,6 +12,7 @@ int atexit(void (*function)(void));
|
|||||||
void exit(int status);
|
void exit(int status);
|
||||||
void abort(void);
|
void abort(void);
|
||||||
|
|
||||||
|
void *calloc(size_t num, size_t sz);
|
||||||
void *malloc(size_t sz);
|
void *malloc(size_t sz);
|
||||||
void free(void *buf);
|
void free(void *buf);
|
||||||
|
|
||||||
|
@ -150,6 +150,12 @@ free_large(Header *mem)
|
|||||||
munmap(mem, mem->size);
|
munmap(mem, mem->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
calloc(size_t num, size_t sz)
|
||||||
|
{
|
||||||
|
return malloc(num*sz);
|
||||||
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
malloc(size_t sz)
|
malloc(size_t sz)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user