From: Ben Pfaff Date: Mon, 27 Sep 2004 21:57:01 +0000 (+0000) Subject: Bug fix. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=746e40c7342362a47f88d06e8147a2d5d5c19fff;p=pintos-anon Bug fix. --- diff --git a/src/threads/palloc.c b/src/threads/palloc.c index f7d49b2..3e7c6a2 100644 --- a/src/threads/palloc.c +++ b/src/threads/palloc.c @@ -166,6 +166,7 @@ init_pool (struct pool *p, void *start, void *end, const char *name) lock_init (&p->lock, name); bitmap_size = ROUND_UP (bitmap_needed_bytes (page_cnt), PGSIZE); + page_cnt -= bitmap_size / PGSIZE; p->used_map = bitmap_create_preallocated (page_cnt, start, bitmap_size); p->start = start + bitmap_size; p->end = end;