diff options
author | phk <phk@FreeBSD.org> | 1997-06-22 17:48:35 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-06-22 17:48:35 +0000 |
commit | 711f7235a180f520b0c1eb667d0519ae5792bdfa (patch) | |
tree | eead3f570878ff989beb4bf1f8820fa7d21604a6 /gnu | |
parent | 7bf6a981bc720d7cc5458dd92e293fed9a592386 (diff) | |
download | FreeBSD-src-711f7235a180f520b0c1eb667d0519ae5792bdfa.zip FreeBSD-src-711f7235a180f520b0c1eb667d0519ae5792bdfa.tar.gz |
BYOC - Bring Your Own Calloc(3)
Someday I'm going to face the music and dispose of this private malloc copy.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/ld/rtld/malloc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/usr.bin/ld/rtld/malloc.c b/gnu/usr.bin/ld/rtld/malloc.c index 920dcba..f6f2bf5 100644 --- a/gnu/usr.bin/ld/rtld/malloc.c +++ b/gnu/usr.bin/ld/rtld/malloc.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)malloc.c 5.11 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id$"; +static char *rcsid = "$Id: malloc.c,v 1.7 1997/02/22 15:46:46 peter Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -480,3 +480,16 @@ int n; #endif return n; } + +void * +calloc(num, size) + size_t num; + register size_t size; +{ + register void *p; + + size *= num; + if ( (p = malloc(size)) ) + bzero(p, size); + return(p); +} |