X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpool.c;h=4eea7bf700f8e0ab0981bd22c0f2b3933050f546;hb=23552983305e667eeb772406d1745ab7b865855e;hp=6143c68af0b67c5f2f87301b08e90773e8b31000;hpb=b7e3d06a00ca5c95df8202678da7e3b11037c6be;p=libucw.git diff --git a/lib/pool.c b/lib/pool.c index 6143c68a..4eea7bf7 100644 --- a/lib/pool.c +++ b/lib/pool.c @@ -8,6 +8,7 @@ #include "lib/pools.h" #include +#include struct memchunk { struct memchunk *next; @@ -97,3 +98,11 @@ mp_alloc(struct mempool *p, uns s) return c->data; } } + +void * +mp_alloc_zero(struct mempool *p, uns s) +{ + void *x = mp_alloc(p, s); + bzero(x, s); + return x; +}