HomeFreeBSD

Fix three miscalculations in amount of boot pages:

Description

Fix three miscalculations in amount of boot pages:

o Most of startup zones have struct uma_slab embedded into the slab,

so provide macro UMA_SLAB_SPACE and use it instead of UMA_SLAB_SIZE,
when calculating how many pages would certain kind of allocations
require. Some zones are offpage, so we might have a positive inaccuracy.

o The keg for the zone of zones is allocated "dynamically", so we

need +1 when calculating amount of pages for kegs. [1]

o The zones of zones and zones of kegs have arbitrary alignment of 32,

and this also needs to be accounted for. [2]

While here, spread more comments and improve diagnostic messages.

Reported by: pho [1], jtl [2]

Details

Provenance
glebiusAuthored on
Parents
rS328981: MFC r328694:
Branches
Unknown
Tags
Unknown