Page MenuHomePhabricator

[NFC] Move `AddressSpaceView` out of `Params` for Size class allocators.
Needs RevisionPublic

Authored by delcypher on Jan 27 2019, 12:46 PM.



Making Params a templated type and passing the AddressSpaceView
to the size class allocators was a design mistake. This patch instead
makes AddressSpaceView a separate template parameter and turns
Params::ByteMap into a templated alias Params::ByteMapASVT.
This gives us several wins.

  • This change in design means it possible for the size class allocators can construct the type for their RemoteAddressSpaceView counter-part. Previously that was exceedingly difficult because the Params type the size class allocators received already had the AddressSpaceView type chosen.
  • The AP32 and AP64 no longer need to be templated.
  • AP64 declarations go back to being simple.
  • The type of SizeClassAllocator32::ByteMap is now correct by construction (i.e. AP32 definitions can't pass in a ByteMap with the wrong AddressSpaceView).

The only downside to this patch is that it makes AP32 declarations
more complicated.


Event Timeline

delcypher created this revision.Jan 27 2019, 12:46 PM
Herald added subscribers: Restricted Project, kubamracek. · View Herald TranscriptJan 27 2019, 12:46 PM
vitalybuka requested changes to this revision.Apr 24 2019, 11:12 AM

Removing stale patches from the "Ready to Review" list.

This revision now requires changes to proceed.Apr 24 2019, 11:12 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 24 2019, 11:12 AM