fix ifdef around mapped_memory