Hello Ken, [Cc: guile-devel.]
Ken Raeburn <raeb...@raeburn.org> 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 `.data.rel.ro' 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'.) Thanks, Ludo'.