gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Linker symbols/Memory footprint


From: Camm Maguire
Subject: [Gcl-devel] Linker symbols/Memory footprint
Date: Mon, 25 Apr 2005 17:13:29 -0400
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory ōmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)

Greetings!  As some of you may recall, the bfd-based linker has a >1Mb
overhead on the final image size.  As we know, this is a waste we can
likely live with, but for other reasons, I've managed to implement a
replacement where the bfd memory pertaining to the parent image is
freed and the C symbol addresses are hashed instead as values of lisp
symbols interned in a special package "LINK".  This takes out about
500k of the waste, uses significantly faster relocatable memory, but
perhaps most importantly, brings this information forward to the lisp
level where it may be of future use.  It would still be more efficient
memory wise to use a simple hash table of strings and long integers as
opposed to symbols and fixnums, but then we'd loose lisp access.
Feedback/opinions are most welcome.  The primary benefit of lisp
access to this info of which I can conceive at present is in use for
profiling, where it would be quite desirable to be able to generate a
gprof-like ranked call graph without having to make all images with
compiler::link.  I'm not sure this is worth it, though.

=============================================================================
(let ((i 0)) (do-symbols (s 'link) (format t "~S ~S~%" (symbol-name s) (when 
(boundp s) (symbol-value s))) (incf i)) i)
"in_list_flag" 138056556
"__gmpz_divexact_ui" 134523884
"bfd_open_file" 134786064
"add_history" 134524700
"init_gcl_cmpmap" 135974320
...
2773
=============================================================================

Take care,

Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah





reply via email to

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