Tiny optimization by skipping a no-op iteration.
We initialize the physicalPagesEnd from physical_memory_range[0] so re-evaluating that range is a no-op.
This commit is contained in:
parent
3dbd9c1148
commit
4200073542
@ -3230,7 +3230,7 @@ vm_page_init_num_pages(kernel_args *args)
|
||||
sNonExistingPages = 0;
|
||||
sIgnoredPages = args->ignored_physical_memory / B_PAGE_SIZE;
|
||||
|
||||
for (uint32 i = 0; i < args->num_physical_memory_ranges; i++) {
|
||||
for (uint32 i = 1; i < args->num_physical_memory_ranges; i++) {
|
||||
page_num_t start = args->physical_memory_range[i].start / B_PAGE_SIZE;
|
||||
if (start > physicalPagesEnd)
|
||||
sNonExistingPages += start - physicalPagesEnd;
|
||||
|
Loading…
Reference in New Issue
Block a user