mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
align vma region to the page boundary
This commit is contained in:
parent
69bb0a6a1c
commit
8eb597d0c5
1 changed files with 2 additions and 2 deletions
|
@ -593,7 +593,7 @@ err_t mmnif_init(struct netif *netif)
|
|||
goto out;
|
||||
}
|
||||
|
||||
err = vma_add((size_t)header_start_address, (size_t)header_start_address + ((nodes * header_size) >> PAGE_BITS), VMA_READ|VMA_WRITE|VMA_CACHEABLE);
|
||||
err = vma_add((size_t)header_start_address, PAGE_FLOOR((size_t)header_start_address + ((nodes * header_size) >> PAGE_BITS)), VMA_READ|VMA_WRITE|VMA_CACHEABLE);
|
||||
if (BUILTIN_EXPECT(err, 0)) {
|
||||
DEBUGPRINTF("mmnif init(): vma_add failed for header_start_address %p\n", header_start_address);
|
||||
goto out;
|
||||
|
@ -619,7 +619,7 @@ err_t mmnif_init(struct netif *netif)
|
|||
goto out;
|
||||
}
|
||||
|
||||
err = vma_add((size_t)heap_start_address, (size_t)heap_start_address + ((nodes * heap_size) >> PAGE_BITS), VMA_READ|VMA_WRITE|VMA_CACHEABLE);
|
||||
err = vma_add((size_t)heap_start_address, PAGE_FLOOR((size_t)heap_start_address + ((nodes * heap_size) >> PAGE_BITS)), VMA_READ|VMA_WRITE|VMA_CACHEABLE);
|
||||
if (BUILTIN_EXPECT(!heap_start_address, 0))
|
||||
{
|
||||
DEBUGPRINTF("mmnif init(): vma_add failed for heap_start_address %p\n", heap_start_address);
|
||||
|
|
Loading…
Add table
Reference in a new issue