major refactoring of platform/x64/memory