fix: last page of the pt is now usable
This commit is contained in:
parent
773f55466e
commit
9944f79b2e
@ -17,7 +17,7 @@ static int16_t find_next_block(size_t nb_pages, uint16_t *pd_index_ptr,
|
|||||||
}
|
}
|
||||||
*page_table_ptr =
|
*page_table_ptr =
|
||||||
(uint32_t *)GET_PAGE_ADDR(0, *pd_index_ptr + PT_START);
|
(uint32_t *)GET_PAGE_ADDR(0, *pd_index_ptr + PT_START);
|
||||||
for (uint16_t i = 0; i + nb_pages < PT_SIZE; i++) {
|
for (uint16_t i = 0; i + nb_pages - 1 < PT_SIZE; i++) {
|
||||||
uint16_t j;
|
uint16_t j;
|
||||||
for (j = 0; (*page_table_ptr)[i + j] >> 12 == i + j &&
|
for (j = 0; (*page_table_ptr)[i + j] >> 12 == i + j &&
|
||||||
j < nb_pages;
|
j < nb_pages;
|
||||||
|
Loading…
Reference in New Issue
Block a user