Bug fix.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 27 Sep 2004 21:57:01 +0000 (21:57 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 27 Sep 2004 21:57:01 +0000 (21:57 +0000)
src/threads/palloc.c

index f7d49b2ea47e003a54ab54ab6d766423f89daa9c..3e7c6a2a47f34679e0784a694871e7c1957be861 100644 (file)
@@ -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;