Commit 5abb09da authored by Philippe Gerum's avatar Philippe Gerum

copperplate/heapobj-pshared: fix off-by-one error in pagemap reset

parent 5b0c3677
......@@ -156,7 +156,7 @@ static void init_extent(void *base, struct shared_extent *extent)
assert(lastpgnum >= 1);
/* Mark all pages as free in the page map. */
memset(extent->pagemap, 0, lastpgnum * sizeof(struct page_entry));
memset(extent->pagemap, 0, (lastpgnum + 1) * sizeof(struct page_entry));
/* Clear the allocation bitmap. */
p = __shref(base, extent->bitmap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment