Fixes #594 MacOSX memory mapping
Cleaned up the way memory is mapped in apple.