Update memory.lib.sh