Support pinning in HostAllocator
We want the resize / reserve behaviour to handle page locking that is
useful for efficient GPU transfer, while making it possible to avoid
locking more pages than required for that vector. By embedding the
pin()/unpin() behaviour into malloc() and free() for the allocation
policy, this can be safely handled in all cases.
Additionally, high-level code can now choose for any individual vector
when and whether a pinning policy is required, and even manually
pin and unpin in any special cases that might arise.
When using the policy that does not support pinning, we now use
AlignedAllocator, so that we minimize memory consumption.
Change-Id: I807464222c7cc7718282b1e08204f563869322a0
15 files changed: