move memory-related functions to mmu.js