Memory leaks in search
Submitted by Morten
Link to original bug (#731823)
Description
Search in evince leaks memory. Memory usage as measured by VmSize and VmRss increases when searching in PDF files. Reproducible on 3 different PDF files tested (see below).
To reproduce:
- open PDF
- type in search query
- Let it find all
- Note memory usage and goto 2.
Expected result: Memory usage must be constant
Result: Memory usage increases after each iteration.
Tested on: Evince 3.12.1-14-g2880a1b1 build on Ubuntu server 14.04 running on Xubuntu 14.04. (all x86 64 bit)
Tested on: Evince 3.10.3-0ubuntu10 running on Xubuntu 14.04 (all x86 64 bit)
Example:
Opening downloaded pdf http://james.bond.edu.au/shared/taoup/taoup.pdf
Initial memory usage: Rss 49 MB, Size 998 MB
After first search for "in": Rss 393, Size 1341 MB.
After 2. search for "the": Rss 731, Size 1679 MB.
After 3. search for "on": Rss 1069 MB, Size 2017 MB.
And so on. I stopped this test when Rss reached 1689 MB. Attached is plot of VmRss messured in 4 kB page size for the evince process doing 5 searches.
Closing the search bar do not free memory.
Tested and reproducible on document generated with text to PDF converter a2x, an open book http://james.bond.edu.au/shared/taoup/taoup.pdf and on reference manual for my processor.
Version: 3.12.x