4918685b4a
git-svn-id: svn://kolibrios.org@9189 a494cfbc-eb01-0410-851d-a64ba20cac60
14 lines
254 B
C
14 lines
254 B
C
#include <stdlib.h>
|
|
#include <errno.h>
|
|
#include <sys/ksys.h>
|
|
|
|
void *calloc(size_t num, size_t size) {
|
|
void *ptr = _ksys_alloc(num*size);
|
|
if(!ptr){
|
|
errno = ENOMEM;
|
|
return NULL;
|
|
}
|
|
memset(ptr, 0, num*size);
|
|
return ptr;
|
|
}
|