groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Memory usage of troff


From: Maurice van der Pot
Subject: [Groff] Memory usage of troff
Date: Sat, 21 Nov 2009 17:05:32 +0100

Hi,

I've just had compilation of libX11 fail on my system because it ran out
of memory during generation of the reference documentation using groff.

  http://cgit.freedesktop.org/xorg/lib/libX11/snapshot/libX11-1.3.2.tar.bz2

Using strace I found that running the following command in the
specs/libX11 directory requires about 400MB of memory.

  troff -ms -dxV="libX11 1.3.2" -I. -dwww-image-template=. -Thtml libX11.ms &> 
/dev/null

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.

Valgrind's massif shows a more or less linear increase of memory use over time.
These are the two parts that in the end are responsible for the majority of
allocated memory:

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
287 56,715,762,716      403,261,336      381,991,029    21,270,307            0
94.73% (381,991,029B) (heap allocation functions) malloc/new/new[], 
--alloc-fns, etc.
->67.59% (272,573,250B) 0x443D3C: string::operator=(string const&) 
(string.cpp:126)
| ->62.42% (251,730,382B) 0x4278EA: statem::add_tag_ta() (mtsm.cpp:289)
| | ->62.42% (251,730,382B) 0x40CBA4: environment::construct_state(int) 
(env.cpp:2258)
| |   ->60.65% (244,595,650B) 0x410E40: environment::add_char(charinfo*) 
(env.cpp:316)
| |   | ->60.31% (243,210,666B) 0x42153C: process_input_stack() (input.cpp:2834)
| |   | | ->60.31% (243,210,666B) 0x4227E1: process_input_file(char const*) 
(input.cpp:7373)
| |   | |   ->60.31% (243,210,666B) 0x423918: main (input.cpp:7680)

(...)

->22.89% (92,301,216B) 0x40CAF8: environment::construct_state(int) 
(env.cpp:2250)
| ->22.58% (91,041,888B) 0x410E40: environment::add_char(charinfo*) 
(env.cpp:316)
| | ->22.46% (90,572,496B) 0x42153C: process_input_stack() (input.cpp:2834)
| | | ->22.46% (90,572,496B) 0x4227E1: process_input_file(char const*) 
(input.cpp:7373)
| | |   ->22.46% (90,572,496B) 0x423918: main (input.cpp:7680)
| | |     

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

Attachment: pgpCVrVRGnVXl.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]