Boost logo

Boost :

From: Jeremy Pack (rostovpack_at_[hidden])
Date: 2008-07-11 13:02:37

Could you be a little bit more specific as to what you'd like? What is the
exact use case?

When a shared library is loaded, it is shared by all processes using it. It
is also unloaded in the way memory can be handled by a garbage collecter -
some time after all references to it have been removed.

As such, the first process to load it is, in effect, buffering it into
memory, and other processes can then load it very cheaply.

As far as loading it directly from a memory buffer, that would require
copying a bunch of routines from the platform-specific functions that fix
pointer references, function references, type information etc. within a
shared library when it is loaded.

If you're sending shared libraries over a network connection between
computers, I can see how this might possibly be more optimal. But if you're
shooting to make your program that heavily optimized, I'd recommend assembly
language :)

So, yes, it is possible. No, I don't think it is worth attempting.


On Fri, Jul 11, 2008 at 9:39 AM, Robert Dailey <rcdailey_at_[hidden]> wrote:

> Hi,
> I'm not a huge expert on shared libraries, however I was wondering if
> there's a portable way to support loading libraries from a memory buffer
> instead of from the file system. If this is possible, could it be added as
> a
> feature to Boost.Extension?
> Thanks for reading!
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at