Update memory.h

hash code fix