Refactoring of SharedHeapAllocator