[gs-bugs] [Bug 692278] memory leaks in mupdf for android

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Mon Jul 4 15:32:30 UTC 2011


http://bugs.ghostscript.com/show_bug.cgi?id=692278

Robin Watts <robin.watts at artifex.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robin.watts at artifex.com
         AssignedTo|tor.andersson at artifex.com   |robin.watts at artifex.com

--- Comment #1 from Robin Watts <robin.watts at artifex.com> 2011-07-04 15:32:29 UTC ---
I can't see any obvious memory leaks (although, that's not to say there aren't
any).

If I download the image into the emulator (with pdf_reference17.pdf as the test
file) and start it up, then do:

  adb shell dumpsys meminfo com.artifex.mupdf

It tells me that I have a total of 17240K allocated after the first page is
displayed.

If I then step forward (click next repeatedly) to page 100, the same thing
tells me that I have 20544K allocated. Return to page 1, and I have 21000K. If
I repeat this again and again, I asymptotically reach 21338K or so.

We expect memory to increase for every *new* page that is displayed, as mupdf
has to hold the positions/lengths etc of all the different stream objects used
in each new page. This explains why the memory use climbs as we move forward to
page 100. Fragmentation explains why we see the memory usage climb a bit even
when we tread backwards over pages we have seen before.

On the whole it looks like we aren't losing memory purely by changing from one
page to another.

I think there *may* be a memory leak to do with exiting the app and then
restarting it as the total memory seems to jump significantly every time I exit
and restart.

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list