projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bug fix.
[pintos-anon]
/
src
/
threads
/
palloc.c
diff --git
a/src/threads/palloc.c
b/src/threads/palloc.c
index f7d49b2ea47e003a54ab54ab6d766423f89daa9c..3e7c6a2a47f34679e0784a694871e7c1957be861 100644
(file)
--- 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;