Sign in
plan9port
/
plan9
/
08e793723cad1c7aed2e8cb16c8592aba5ad05e9
/
.
/
src
/
lib9
/
mallocz.c
blob: a3e91510b17797b6b4287f44a601d1fc43c6806d [
file
] [
log
] [
blame
]
#include
<u.h>
#include
<unistd.h>
#include
<string.h>
#include
<libc.h>
void
*
mallocz
(
unsigned
long
n
,
int
clr
)
{
void
*
v
;
v
=
malloc
(
n
);
if
(
clr
&&
v
)
memset
(
v
,
0
,
n
);
return
v
;
}