The first step towards implementing a solution for
SPARK-10000 is to refactor the existing code to go through a common MemoryManager interface. This issue is concerned only with the introduction of this interface, preserving the existing behavior as much as possible. In the near future, we will implement an alternate MemoryManager that shares memory between storage and execution more efficiently.
For a high level design doc, see