xref: /netbsd/sys/arch/ia64/stand/common/calloc.c (revision 6550d01e)
1 /*	$NetBSD: calloc.c,v 1.2 2009/03/18 16:00:12 cegger Exp $	*/
2 
3 #include <sys/cdefs.h>
4 #include <sys/types.h>
5 
6 #include <lib/libsa/stand.h>
7 
8 void *
9 calloc(u_int size1, u_int size2)
10 {
11 	u_int total_size = size1 * size2;
12 	void *ptr;
13 
14 	if(( (ptr = alloc(total_size)) != NULL)) {
15 		memset(ptr, 0, total_size);
16 	}
17 
18 	/* alloc will crib for me. */
19 
20 	return(ptr);
21 }
22