move logMemoryUsage from koptinterface to document