split memory.c into recompiler and interpreter part
update CMakeLists.txt
transform to for loop
removed redundant declarations