[Top][All Lists]

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

Re: [BDW-GC] Static allocation of subrs

From: Ludovic Courtès
Subject: Re: [BDW-GC] Static allocation of subrs
Date: Mon, 02 Feb 2009 09:42:56 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Hello Ken,

[Cc: guile-devel.]

Ken Raeburn <address@hidden> writes:

> On Jan 31, 2009, at 16:43, Ludovic Courtès wrote:
>> I ran `gcbench.scm' with both BDW-GC branches and didn't observe any
>> significant difference.  The benefits are that (i) initialization
>> should
>> be slightly faster, and (ii) running several instances of guile should
>> consume less memory since statically allocated data can be mapped
>> read-only by the loader and, consequently, the underlying physical
>> memory can be shared across instances.
> I've only looked at some of the sources, not built it (various missing
> dependencies, and I don't have much time to play with guile anyways),
> but I'm not sure this is the case.  For the main program, perhaps, but
> the library is generally built as a shared library, which won't have a
> fixed address; anything with addresses in it needs to be adjusted by
> the dynamic loader.

Ah ah, you're right: item (ii) is indeed wrong.  This statically
allocated data needs to be relocated, so it ends up in the
`' section, which is initially mapped read-write by the
loader and modified according to the relocations (linking with GNU ld's
"-z relro" forces this memory region to be mprotect()d read-only as soon
as relocations have been processed), so there's no sharing among
multiple guile instances.

(I realized this while rereading Drepper's `dsohowto.pdf'.)


reply via email to

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