added a check in MemoryAllocator.freePage that only frees if page was mapped