Need to add pre-allocated memoryMap for speed reasons