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.
rdar://problem/45284065