memory: support writing