reduce heap allocations for MemoryMap