[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Memory usage of troff
From: |
Maurice van der Pot |
Subject: |
Re: [Groff] Memory usage of troff |
Date: |
Sun, 22 Nov 2009 14:31:53 +0100 |
On Sun, Nov 22, 2009 at 06:52:27AM +0100, Werner LEMBERG wrote:
> > Now I don't know groff/troff so I ask you, is this not excessive?
> > I would like to understand why troff uses so much memory.
>
> It's a bug, fixed on 2009-04-10, I think. Please try the CVS version.
> Using it, the maximum number of allocated heap space (as checked with
> massif) is 10.52MB for the above call on my Linux box.
Thanks for that pointer, it was very helpful.
I've tried the current version from CVS, but it uses (certain) statem
objects after they have been freed and later frees them again. It looks
like an ownership problem. Nodes delete their statem objects when they
are destroyed, but the same statem objects are deleted when they are
popped from the state machine stack.
The attached patch solves the above problem and also fixes all
"definitely lost" memleaks reported by valgrind. With that patch groff
uses about 10MB on my system as well.
Regards,
Maurice.
--
Maurice van der Pot
Gentoo Linux Developer address@hidden http://www.gentoo.org
Gnome Planner Developer address@hidden http://live.gnome.org/Planner
groff-cvs-double-free-and-leaks.patch
Description: Text document
pgpThsvk6Cn0G.pgp
Description: PGP signature