Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_reserv.c
Show First 20 Lines • Show All 1,354 Lines • ▼ Show 20 Lines | vm_reserv_size(int level) | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* Allocates the virtual and physical memory required by the reservation | * Allocates the virtual and physical memory required by the reservation | ||||
* management system's data structures, in particular, the reservation array. | * management system's data structures, in particular, the reservation array. | ||||
*/ | */ | ||||
vm_paddr_t | vm_paddr_t | ||||
vm_reserv_startup(vm_offset_t *vaddr, vm_paddr_t end, vm_paddr_t high_water) | vm_reserv_startup(vm_offset_t *vaddr, vm_paddr_t end) | ||||
{ | { | ||||
vm_paddr_t new_end; | vm_paddr_t new_end, high_water; | ||||
size_t size; | size_t size; | ||||
int i; | |||||
high_water = phys_avail[1]; | |||||
for (i = 0; i < vm_phys_nsegs; i++) { | |||||
kib: Put {} around the loop body, it has more than one line. | |||||
if (vm_phys_segs[i].end > high_water) | |||||
high_water = vm_phys_segs[i].end; | |||||
} | |||||
Not Done Inline ActionsAnd there too. kib: And there too. | |||||
/* Skip the first chunk. It is already accounted for. */ | |||||
for (i = 2; phys_avail[i + 1] != 0; i += 2) { | |||||
if (phys_avail[i + 1] > high_water) | |||||
high_water = phys_avail[i + 1]; | |||||
} | |||||
/* | /* | ||||
* Calculate the size (in bytes) of the reservation array. Round up | * Calculate the size (in bytes) of the reservation array. Round up | ||||
* from "high_water" because every small page is mapped to an element | * from "high_water" because every small page is mapped to an element | ||||
* in the reservation array based on its physical address. Thus, the | * in the reservation array based on its physical address. Thus, the | ||||
* number of elements in the reservation array can be greater than the | * number of elements in the reservation array can be greater than the | ||||
* number of superpages. | * number of superpages. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |
Put {} around the loop body, it has more than one line.