]> mj.ucw.cz Git - libucw.git/blobdiff - lib/mempool.h
Fix bucket estimator.
[libucw.git] / lib / mempool.h
index efb5fa1bfe86e211570ba0e5caf5c8026e1cc238..d16fa6e09162abe44b14dd771c42e2ad49ecb3a8 100644 (file)
@@ -30,7 +30,7 @@ void *mp_alloc_zero(struct mempool *, uns) LIKE_MALLOC;
 static inline void * LIKE_MALLOC
 mp_alloc_fast(struct mempool *p, uns l)
 {
-  byte *f = (void *) (((addr_int_t) p->free + POOL_ALIGN - 1) & ~(addr_int_t)(POOL_ALIGN - 1));
+  byte *f = (void *) (((uintptr_t) p->free + POOL_ALIGN - 1) & ~(uintptr_t)(POOL_ALIGN - 1));
   byte *ee = f + l;
   if (ee > p->last)
     return mp_alloc(p, l);