diff options
Diffstat (limited to 'kernel/memory/physalloc.c')
-rw-r--r-- | kernel/memory/physalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/memory/physalloc.c b/kernel/memory/physalloc.c index 4255339..47522b8 100644 --- a/kernel/memory/physalloc.c +++ b/kernel/memory/physalloc.c @@ -27,7 +27,7 @@ static const char *segment_type_str[] = { static int n_pages(const struct memory_segment *m) { - return m->len / PAGE_SIZE; + return (m->len + PAGE_SIZE - 1) / PAGE_SIZE; } static void *page_at(int i) |