1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

fix the calucaltion of VMA's lower border

This commit is contained in:
Stefan Lankes 2016-05-31 04:41:16 +02:00
parent 629a42dc4b
commit 2ec60a7602

View file

@ -246,7 +246,7 @@ ssize_t sys_sbrk(ssize_t incr)
// reserve VMA regions
if (PAGE_CEIL(heap->end) > PAGE_CEIL(ret))
vma_add(PAGE_CEIL(ret+PAGE_SIZE), PAGE_FLOOR(heap->end), VMA_HEAP|VMA_USER);
vma_add(PAGE_CEIL(ret), PAGE_FLOOR(heap->end), VMA_HEAP|VMA_USER);
// allocation and mapping of new pages for the heap
// is catched by the pagefault handler