Create memory.c

1st implementations