Update memory.h/.c to follow the style guide.