change getMemoryContext to createMemoryContext since there can be multiple memory contexts