Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2007 19:38:27 +0100
From:      "Bruce M. Simpson" <bms@incunabulum.net>
To:        Pete French <petefrench@ticketswitch.com>,  freebsd-stable@FreeBSD.ORG
Subject:   Re: Static linking and memory usage
Message-ID:  <46C1F6A3.1000101@incunabulum.net>
In-Reply-To: <20070814164154.GA39532@eos.sc1.parodius.com>
References:  <E1IKxQG-0001oe-3M@dilbert.ticketswitch.com> <20070814164154.GA39532@eos.sc1.parodius.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jeremy Chadwick wrote:
> This reminds me: it sure would be useful if we had something like
> Solaris's pmap(1) on FreeBSD.
>
>   
In response to the original post: The kernel's ELF linker/loader for 
executables will share the text and read-only segments for static 
executables.

We already have something similar to pmap in the ports collection, 
called pmap. However, there is a very detailed and powerful tool for 
Linux called Exmap, by John Berthels.

I used it to profile XORP's shared library memory usage in great detail, 
i.e. it gave me figures on how much memory was saved by the text page 
sharing introduced by the use of shared libraries across related 
executables, enabling me to answer the question, "Is the additional work 
of shared libraries worth the hassle?"

I don't have free time to port Exmap to FreeBSD, but if someone does, I 
can put them in touch with John and forward his fairly detailed 
explanation of how to go about doing that. pmap would be a starting 
point for such a port.

regards,
BMS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46C1F6A3.1000101>