Skip to content

Commit

Permalink
syscalls: fix npages
Browse files Browse the repository at this point in the history
  • Loading branch information
ffwff committed Sep 6, 2019
1 parent 11a7243 commit 2befb3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/userspace/syscalls.cr
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ module Syscall
return
end
end
npages = incr / 0x1000
npages = (incr >> 12) + 1
Paging.alloc_page_pg(mmap_heap.end_addr, true, true, npages: npages.to_u64)
mmap_heap.size += incr
elsif incr == 0 && mmap_heap.size == 0u64
Expand Down

0 comments on commit 2befb3c

Please sign in to comment.