X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fbigalloc.c;h=0044846d5d541fb06a03c56f90df8715a0898e2b;hb=bc5f818d21b7aceaf2c0e263b00aa4295211d8f9;hp=3133170e5f6921dd86e5aaa893a0b3769c411a64;hpb=804b539f2f9d9af87ffa7036fd2b181fb12d86f1;p=libucw.git diff --git a/ucw/bigalloc.c b/ucw/bigalloc.c index 3133170e..0044846d 100644 --- a/ucw/bigalloc.c +++ b/ucw/bigalloc.c @@ -8,7 +8,7 @@ * of the GNU Lesser General Public License. */ -#include "ucw/lib.h" +#include #include #include @@ -65,11 +65,11 @@ big_alloc(u64 len) u64 l = big_round(len); if (l > SIZE_MAX - 2*CPU_PAGE_SIZE) die("big_alloc: Size %llu is too large for the current architecture", (long long) len); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_UCW_DEBUG l += 2*CPU_PAGE_SIZE; #endif byte *p = page_alloc(l); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_UCW_DEBUG *(u64*)p = len; mprotect(p, CPU_PAGE_SIZE, PROT_NONE); mprotect(p+l-CPU_PAGE_SIZE, CPU_PAGE_SIZE, PROT_NONE); @@ -91,7 +91,7 @@ big_free(void *start, u64 len) { byte *p = start; u64 l = big_round(len); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_UCW_DEBUG p -= CPU_PAGE_SIZE; mprotect(p, CPU_PAGE_SIZE, PROT_READ); ASSERT(*(u64*)p == len);