Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1.  
  2. void *ft_calloc(size_t count, size_t size)
  3. {
  4. char *ptrheap;
  5.  
  6. while (count)
  7. {
  8. ptrheap = malloc(size);
  9. if (ptrheap == NULL)
  10. return (0);
  11. ft_memset(ptrheap, '\0', size);
  12. count--;
  13. }
  14. return ptrheap - count;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement