1 /*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #if defined(LIBC_SCCS) && !defined(lint) 9 static char sccsid[] = "@(#)calloc.c 5.4 (Berkeley) 05/16/90"; 10 #endif /* LIBC_SCCS and not lint */ 11 12 #include <stdlib.h> 13 14 void * 15 calloc(num, size) 16 size_t num; 17 register size_t size; 18 { 19 register void *p; 20 21 size *= num; 22 if (p = malloc(size)) 23 bzero(p, size); 24 return(p); 25 } 26 27 cfree(p, num, size) 28 void *p; 29 size_t num, size; 30 { 31 (void)free(p); 32 } 33