Subversion Repositories Kolibri OS

Rev

Rev 8793 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #include <stdlib.h>
  2. #include <errno.h>
  3. #include <sys/ksys.h>
  4.  
  5. void *calloc(size_t num, size_t size) {
  6.     void *ptr = _ksys_alloc(num*size);
  7.     if(!ptr){
  8.         errno = ENOMEM;
  9.         return NULL;
  10.     }
  11.     memset(ptr, 0, num*size);
  12.     return ptr;
  13. }
  14.