You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit removes the use fo `MemoryStyle` for determining the size of
the allocation of a `MmapMemory`. This should semanatically be the same
as before but it's hoped that the new version is clearer to understand
as it doesn't require going through the `MemoryStyle` abstraction to
understand how tunables interact with linear memory. The semantics for
the allocation of linear memory are:
reservation = tunables.memory_reservation
growth = tunables.memory_reservation_for_growth
if maximum <= reservation {
growth = 0
} else if minimum <= reservation {
// use settings above
} else {
reservation = minimum + growth
}
This means that the initial memory allocation is always
`tunables.memory_reservation` unless that's not large enough to fit the
linear memory. In such a situation the other settings, such as
`memory_reservation_for_growth`, kick in.
The logic of clamping the maximum and/or dealing with static/dynamic are
now all unnecessary and/or tracked elsewhere. For example the clamping
nature of `maximum` now happens implicitly by rejecting growth when
`memory_may_move` is false which should help keep that complexity
localized where necessary rather than conflating multiple settings
together.
0 commit comments