Rev 8793 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8793 | Rev 9189 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include |
1 | #include |
- | 2 | #include |
|
2 | #include |
3 | #include |
Line 3... | Line 4... | ||
3 | 4 | ||
4 | void *calloc(size_t num, size_t size) { |
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); |
|
5 | return _ksys_alloc(num*size); |
12 | return ptr; |
6 | } |
13 | } |