X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fmempool.c;h=d04e15ef815510bf1a97e42d859b4b05daa01a86;hb=e938d9e3bf5c98b502178ee26d81a410890fb725;hp=fe85a8c581b1f07b51a06519b5300e6e3b9a302e;hpb=031256ad2e123eec58521f8e3eb9496c197641d2;p=libucw.git diff --git a/ucw/mempool.c b/ucw/mempool.c index fe85a8c5..d04e15ef 100644 --- a/ucw/mempool.c +++ b/ucw/mempool.c @@ -26,7 +26,7 @@ struct mempool_chunk { static uns mp_align_size(uns size) { -#ifdef POOL_IS_MMAP +#ifdef CONFIG_UCW_POOL_IS_MMAP return ALIGN_TO(size + MP_CHUNK_TAIL, CPU_PAGE_SIZE) - MP_CHUNK_TAIL; #else return ALIGN_TO(size, CPU_STRUCT_ALIGN); @@ -61,7 +61,7 @@ mp_free_big_chunk(struct mempool_chunk *chunk) static void * mp_new_chunk(uns size) { -#ifdef POOL_IS_MMAP +#ifdef CONFIG_UCW_POOL_IS_MMAP struct mempool_chunk *chunk; chunk = page_alloc(size + MP_CHUNK_TAIL) + size; chunk->size = size; @@ -74,7 +74,7 @@ mp_new_chunk(uns size) static void mp_free_chunk(struct mempool_chunk *chunk) { -#ifdef POOL_IS_MMAP +#ifdef CONFIG_UCW_POOL_IS_MMAP page_free((void *)chunk - chunk->size, chunk->size + MP_CHUNK_TAIL); #else mp_free_big_chunk(chunk);