Function formatMemoryTraces