[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Problems with library unloading
From:       Michael Matz <matz () ifh ! de>
Date:       2000-10-26 15:38:01
[Download RAW message or body]

Hi,

On Thu, 26 Oct 2000, Stephan Kulow wrote:
> Szymon Stefanek wrote:
> > I have a small problem related to the library unloading.
> > I'm currently extending the KDE2.0 support in KVIrc and have
> > encountered a curious crash at the application shutdown
> > when KVIrc is linked to the KDE libraries.

What makes you think, that this is connected to unloading? If you set
KDE_NOUNLOAD (an environment variable) you can verify that it really comes
from unloading (it disables it).

> What exactly were the advantages of unloading, that made all
> these problems we have with it, worth them? 
> It savs 20KB of RAM, right?

For small modules it seems like overkill. The exceptions are applications
which load modules en mass, but only access few (kcontrol is an example),
and khtml itself, which maps 2543616 bytes into memory. Probably also all
the kparts in koffice need much memory, so they would suffer from not
unloading (I have the feeling that this may make the difference of being
able to run at 64 MB or not).

Currently there are only a few rules to make unloading work, don't leak
memory (which should anyway be the rule), and don't use function-scope
static objects. I really think it is usefull, and we don't have _that_
many problems with it. May be we should switch the unloadability from
"default on" to "default off", and only turn it on if the lib exports a
special symbol.


Ciao,
Michael.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic