On 12/05/2011 09:37, Tor Lillqvist wrote:
> Hi,
> 
> Is there any public discussion or documentation on the rebasing done at
> various stages in OOo? When building, in postprocess each DLL is
> rebased so that they have unique base addresses, and don't overlap if
> loaded at these addresses. But then in an installer custom action this
> is reverted (on non-server OSes) and each DLL is rebased back to the
> default 0x10000000. Why? And what is the intended use case of the
> rebaseoo and rebasegui programs?

Carsten did something in OOo 3.3 to improve startup performance.
my vague memory of what he found out:

on NT6 (Vista or newer) the OS does aggressive caching and cold start is
very fast.
on NT5 (XP, WS2003) the OS does not do much caching, the DLLs are
demand-paged, and the result is that if you have a hard disk it will seek
a lot and cold start will be slow.

now there is a trick to force NT5 to not demand-page the DLLs: if their
base addresses overlap, the runtime linker is forced to relocate them, and
in order to do that, it reads in the entire DLL at once, without seeks.
the CPU overhead of relocating is negligible compared with the seeking.

so on NT5 you are better off with overlapping base addresses, and the
thingy that runs after installation is supposed to do this.

_but_ this makes sense only on a single user system (desktop).
on a multi-user server the relocated DLLs cannot be shared in memory, and
on a multi-user server OOo will probably be loaded in memory anyway by
another user.

HTH,
 michael

-- 
Leela: Uh, Professor, are we even allowed in the Forbidden Zone?
Prof. Farnsworth: Why, of course!  It's just a name, like the Death Zone
    or the Zone of No Return.  All the zones have names like that
    in the Galaxy of Terror.

-- 
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help

Reply via email to