collect all memory-related functions to memory.c