projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
use bzero
[unix-history]
/
usr
/
src
/
lib
/
libc
/
stdlib
/
calloc.c
/* @(#)calloc.c 4.2 (Berkeley) %G% */
/*
* Calloc - allocate and clear memory block
*/
char
*
calloc
(
num
,
size
)
register
unsigned
num
,
size
;
{
extern
char
*
malloc
();
register
char
*
p
;
size
*=
num
;
if
(
p
=
malloc
(
size
))
bzero
(
p
,
size
);
return
(
p
);
}
cfree
(
p
,
num
,
size
)
char
*
p
;
unsigned
num
;
unsigned
size
;
{
free
(
p
);
}