diff --git a/src/hulk/hurl/a1.d b/src/hulk/hurl/a1.d index 9a9c483..f7bf2c5 100644 --- a/src/hulk/hurl/a1.d +++ b/src/hulk/hurl/a1.d @@ -35,17 +35,17 @@ struct A1 ulong address = Hurl.A1_BASE + allocated; - ulong mapped_limit = round_up_power_2(address, PAGE_SIZE); + ulong current_limit = round_up_power_2(address, PAGE_SIZE); allocated += size; ulong desired_limit = round_up_power_2(Hurl.A1_BASE + allocated, PAGE_SIZE); - while (desired_limit > mapped_limit) + while (desired_limit > current_limit) { void * page = Hippo.allocate_page(); - Hurl.map(Hurl.A1_BASE + mapped_limit, page, PT_WRITABLE); - mapped_limit += PAGE_SIZE; + Hurl.map(current_limit, page, PT_WRITABLE); + current_limit += PAGE_SIZE; } return cast(void *)address;