X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Falloc.c;h=678901a98e834f330d38c97fefb7f999982afc86;hb=239f3fb07d3b69db82ddb097f16c495c6a289349;hp=bab72329a6fe13fa9db505261e2f9bdd16936f8d;hpb=34289767d57bb8845699c819362d286bd51c8952;p=libucw.git diff --git a/lib/alloc.c b/lib/alloc.c index bab72329..678901a9 100644 --- a/lib/alloc.c +++ b/lib/alloc.c @@ -1,7 +1,10 @@ /* - * Sherlock Library -- Memory Allocation + * UCW Library -- Memory Allocation * * (c) 2000 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ #include "lib/lib.h" @@ -9,7 +12,7 @@ #include #include -#ifndef DMALLOC +#ifndef DEBUG_DMALLOC void * xmalloc(uns size) @@ -29,3 +32,14 @@ xmalloc_zero(uns size) bzero(x, size); return x; } + +void +xfree(void *ptr) +{ + /* + * Maybe it is a little waste of resources to make this a function instead + * of a macro, but xmalloc() is not used for anything critical anyway, + * so let's prefer simplicity. + */ + free(ptr); +}