memory: add method to create mapped memory