X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fpools.h;h=aef1e63e4437f8a1f9838532cea0a12bbae700aa;hb=9f87c6fe6552ce8b2236a07307d2f825b0e4c439;hp=b8e6e9643edfece897206ee6614a89a3fea34236;hpb=b7e3d06a00ca5c95df8202678da7e3b11037c6be;p=libucw.git diff --git a/lib/pools.h b/lib/pools.h index b8e6e964..aef1e63e 100644 --- a/lib/pools.h +++ b/lib/pools.h @@ -2,8 +2,14 @@ * Sherlock Library -- Memory Pools * * (c) 1997--2001 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ +#ifndef _SHERLOCK_POOLS_H +#define _SHERLOCK_POOLS_H + #ifndef POOL_ALIGN #define POOL_ALIGN CPU_STRUCT_ALIGN #endif @@ -19,6 +25,7 @@ struct mempool *mp_new(uns); void mp_delete(struct mempool *); void mp_flush(struct mempool *); void *mp_alloc(struct mempool *, uns); +void *mp_alloc_zero(struct mempool *, uns); static inline void *mp_alloc_fast(struct mempool *p, uns l) { @@ -39,3 +46,5 @@ static inline void *mp_alloc_fast_noalign(struct mempool *p, uns l) p->free = ee; return f; } + +#endif