"I was recently hired by SuSE to focus on optimizing KDE, and as
part of my work, I have written an analysis of KDE memory usage
based on Waldo Bastian's previous paper concerning GNU/Linux linker
issues and KDE startup-performance. As it turns out, the linker
issues examined by Waldo do indeed have an effect on the memory
usage of C++ applications compiled and linked under GNU/Linux. The
most important number from this paper: About 650KB of memory wasted
per KDE application not launched via KDE Init."
"In theory, C++ is as efficient (both in memory and
speed) as C, C++ features that have no direct equivalent in C are
as efficient as equivalent hand-written code in C implementing the
same feature, and C++ features that are not used don't cause any
In theory, shared libraries are completely shared by all
programs (processes) using them, without needing any additional
memory - more memory should be needed only if some functionality in
the library is used and is needed for this functionality.
Unfortunately, neither of these two assumptions is true in
practice. When using gcc/GNU ld/glibc in projects like KDE where
large C++ libraries are used, the overhead may become significant,
because of gcc/GNU ld/glibc inefficient handling of large C++
In this document, I'll try to analyze some of the reasons why
large C++ libraries cause so much overhead. Before reading this
document, you should first read Waldo Bastian's document about
certain linker problems (
http://www.suse.de/~bastian/Export/linking.txt ), which is mainly
aimed at slow startup of applications using large C++ libraries. In
this document, the speed aspects are ignored, as the speed problems
seem to be fixed by a prelink tool that's under development.
Instead, this document focuses on increased memory usage of
applications using large C++ libraries, caused by these
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.