Skip to content

Release memory made by small memory allocations

Arjun AK requested to merge arjunak/ktexteditor:master into master

This can be tested with the following code:

for (int i = 0; i < 1000 * 1000; i++) {
    doc->insertText(doc->documentEnd(), "abc\n");
}

doc->setModified(false);
doc->closeUrl();

Before the change memory usage is 1.6GiB, with the change it reduces to 210MiB.

Merge request reports