From 373665bbe5d757875d53d63b0a14bcdc10bb0e03 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Tue, 3 Feb 2009 22:48:47 -0800 Subject: [PATCH] make page_alloc(0) work --- ucw/bigalloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ucw/bigalloc.c b/ucw/bigalloc.c index 7532a446..3133170e 100644 --- a/ucw/bigalloc.c +++ b/ucw/bigalloc.c @@ -17,6 +17,8 @@ void * page_alloc(u64 len) { + if (!len) + return NULL; if (len > SIZE_MAX) die("page_alloc: Size %llu is too large for the current architecture", (long long) len); ASSERT(!(len & (CPU_PAGE_SIZE-1))); -- 2.39.2