Linux shared libraries

Miscellaneous Forums/General Discussion/Linux shared libraries

I am pondering a Linux... thing.

I won't describe the idea in-depth because it would take too long (sorry!), so I'll just say what I need to do:

I need software which can share memory with programs at run-time and keep a tab on all of that memory (amongst other things).
So far I have figured out that the shared memory needs Shared Memory (which happily exists... yay!).

However, where I am stuck is what kind of library/program I should develop to do all this.
It needs to be possible for every process to be talking to the same instance of the library, because every process needs access to what every other process has told it. It also needs to be fast and without any ugly hacks (ie: no window messages to communicate).
Since I probably made no sense, I will try to restate myself: I need one program running in the background, so that any program can talk to that same instance easily at run-time.

My first idea involved a daemon which keeps track of everything and which is communicated with using a simple library compiled into whatever program uses it. This seems possible, but it would get fiddly and ugly-hackey around where I need to get the library talking to the daemon using inter-process communication.

I have tracked down Shared Libraries from here, but I am unsure as to whether they are exactly what I need.

Have you had any run-ins with these things?
Have you developed anything similar?

Edit:
Meh, here's my quick rambling out the idea as fast as I can thing to get you a better idea of what I'm doing. It's become more organized and changed a bit (shared Events, hopefully, as opposed to functions; that, and the entire vision has changed) since I started writing out the plan in Tomboy.
http://ubuntuforums.org/showthread.php?t=273210

Knowing next to nothing about Linux I passed it onto my linux guru friend and this was his reply. Hope it helps.

I've read what he's trying to do. Tell him he's re-inventing the wheel, and he should look at D-BUS or DCOP (preferably D-BUS, because this seems to be the way things are headed in the future):

http://dbus.freedesktop.org/doc/dbus-tutorial.html
http://dbus.freedesktop.org/doc/dbus-faq.html

Ah, yes!
Thank you; D-Bus sounds excellently useful :)

I'm not really reinventing the wheel, as this all runs in the upper-level stuff; it's just a little service that I'm hoping programs will eventually make frequent use of. (As opposed to a kernel module or something).

Of course, I may soon learn how wrong that assumption of mine is...

Okay, so I guess I'll be putting a daemon as a service with D-Bus, then have an API that talks to it...

Thanks again.

No problem.