Moved MemUtil methods to MemoryUtil