]> mj.ucw.cz Git - libucw.git/blobdiff - lib/mempool.c
Added bit_array_assign(), replaced BIT_ARRAY_ALLOC by functions.
[libucw.git] / lib / mempool.c
index b0c03eed50ab5a628462f8ce35783d52fc3cb81d..af65b2856770199bf73e38320b34941d6716814a 100644 (file)
@@ -10,7 +10,6 @@
 #include "lib/lib.h"
 #include "lib/mempool.h"
 
-#include <stdlib.h>
 #include <string.h>
 
 struct memchunk {
@@ -69,7 +68,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;