X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Falloc.c;h=40f3edf3171379ab42ba68461e8ab13781454649;hb=aac1c6571404bfbf5654a671d66c8ff043f9c9eb;hp=c72851eec33c7cf4eebdb27e9ff6c9421aabff5b;hpb=0e7d50eaa3d75b0093d44e7e632315ec70ceddcf;p=libucw.git diff --git a/lib/alloc.c b/lib/alloc.c index c72851ee..40f3edf3 100644 --- a/lib/alloc.c +++ b/lib/alloc.c @@ -1,13 +1,18 @@ /* * Sherlock Library -- Memory Allocation * - * (c) 1997 Martin Mares, + * (c) 2000 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ -#include +#include "lib/lib.h" + #include +#include -#include "lib.h" +#ifndef DMALLOC void * xmalloc(uns size) @@ -17,3 +22,13 @@ xmalloc(uns size) die("Cannot allocate %d bytes of memory", size); return x; } + +#endif + +void * +xmalloc_zero(uns size) +{ + void *x = xmalloc(size); + bzero(x, size); + return x; +}