Afficher un message
Vieux 19/10/2007, 12h29   #6
cr88192
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: static library and dynamic library


"Even" <szhang@winbond.com> wrote in message
news:1192760673.817902.310890@t8g2000prg.googlegro ups.com...
> Thanks for your all reply, especially cr88192.
>
> That is, in linux different processes share the the same code(Dlls),
> but in window they copy the code to their space.
>


linux usually shares code. this is because shared-objects tend to be
compiled with position-independent-code.

windows tries to share pages, but does not if the hard-coded address can't
be used (many DLLs are pre-relocated to be loaded at certain addresses...).

> Now we have a global variable(g_var) in Dlls, in linux if one process
> change the *g_var*, and does it effect another process?
>


probably, linux likely handles shared libraries similar to, fork(), namely
that any shared pages are copy-on-write.

> by the way, what's the different between 'load time' and 'running
> time'. Does 'OS' control 'load time'?
>


load time is, when the app is being loaded. runtime generally means
"whenever the app so feels like it".
yes, usually load-time is OS controlled.


or such...

  Réponse avec citation
 
Page generated in 0,04864 seconds with 9 queries