]> mj.ucw.cz Git - libucw.git/blobdiff - lib/mempool.c
increase buffer 3x
[libucw.git] / lib / mempool.c
index b0c03eed50ab5a628462f8ce35783d52fc3cb81d..410fa16ba24d22ef211146cf2a141ab4a5cdeba1 100644 (file)
@@ -69,7 +69,7 @@ mp_alloc(struct mempool *p, uns s)
 {
   if (s <= p->threshold)
     {
-      byte *x = (byte *)(((uns) p->free + POOL_ALIGN - 1) & ~(POOL_ALIGN - 1));
+      byte *x = (byte *)(((addr_int_t) p->free + POOL_ALIGN - 1) & ~(addr_int_t)(POOL_ALIGN - 1));
       if (x + s > p->last)
        {
          struct memchunk *c;