moving map storage from stack to heap; fixed 4TB allocation