Address Space Reservation

Expert opinions:

  • Niall Douglas: I would favour option 1, then 2. I would disregard option 3 as there is nothing being specified here which precludes the later proposal of a subsequent standardised address space management API. I would disregard option 4 because without some sort of address space reservation mechanism, the utility of M2_PREVENT_MOVE in enabling object orientated languages to perform in-place object array extension is greatly – perhaps catastrophically – limited. Regarding option 1 before option 2, I would suggest that in practice the choice of address space reservation quantity is actually fairly statically determined rather than dynamically, and moreover most implementations will only bother applying address space reservation hints when the block is more than a few hundred kilobytes anyway (memcpy() is actually quicker for smaller blocks). Have a look at the example code in the C++ standard proposal – you’ll see how the sample STL allocator uses a simple heuristic to statically choose reservation amount.


Post a Comment

Required fields are marked *


%d bloggers like this: