Permanently loading shared libraries

Is there a way to prevent unloading a shared library at the termination of
the last program that is using it?
Markus

You could put it into /dev/shmem or /proc/boot, then it will live its
own life in memory. Otherwise shared libraries are nothing but regions
of memory mapped into address space of processes. If there is no process
mapping it, the mapping can not exist.

  • igor

Markus Loffler wrote:

Is there a way to prevent unloading a shared library at the termination of
the last program that is using it?
Markus

A simple way to do this is create a tiny program, that references a
symbol in the so, and never terminates. I can’t think of many benefits
of doing this, other than it might produce a slightly faster load time
to what otherwise would be the first executable to use the lib.

-----Original Message-----
From: Markus Loffler [mailto:loffler@ces.clemson.edu]
Posted At: Wednesday, April 11, 2001 3:06 PM
Posted To: os
Conversation: Permanently loading shared libraries
Subject: Permanently loading shared libraries


Is there a way to prevent unloading a shared library at the termination
of
the last program that is using it?
Markus

Yes, this was my idea behind it - have it loading faster.
Thanks for your ideas.

Also, I might want to do something like XPhoton - the first time you load an
x-program, it pops up with a message. The next time it does not do this
anymore…

Is XPhoton a shared library that’s loaded?
So how is it done there then?

Thanks
Markus


“Rennie Allen” <RAllen@csical.com> wrote in message
news:D4907B331846D31198090050046F80C903C8B7@exchangecal.hq.csical.com

A simple way to do this is create a tiny program, that references a
symbol in the so, and never terminates. I can’t think of many benefits
of doing this, other than it might produce a slightly faster load time
to what otherwise would be the first executable to use the lib.

-----Original Message-----
From: Markus Loffler [mailto:> loffler@ces.clemson.edu> ]
Posted At: Wednesday, April 11, 2001 3:06 PM
Posted To: os
Conversation: Permanently loading shared libraries
Subject: Permanently loading shared libraries


Is there a way to prevent unloading a shared library at the termination
of
the last program that is using it?
Markus

Xphoton is an executable (a server). I’m not sure how the banner is
handled, but being a server, it could simply pop-up the banner the first
time it get’s a connection from a client.

-----Original Message-----
From: Markus Loffler [mailto:loffler@ces.clemson.edu]
Posted At: Friday, April 13, 2001 8:45 AM
Posted To: os
Conversation: Permanently loading shared libraries
Subject: Re: Permanently loading shared libraries


Yes, this was my idea behind it - have it loading faster.
Thanks for your ideas.

Also, I might want to do something like XPhoton - the first time you
load an
x-program, it pops up with a message. The next time it does not do this
anymore…

Is XPhoton a shared library that’s loaded?
So how is it done there then?

Thanks
Markus


“Rennie Allen” <RAllen@csical.com> wrote in message
news:D4907B331846D31198090050046F80C903C8B7@exchangecal.hq.csical.com

A simple way to do this is create a tiny program, that references a
symbol in the so, and never terminates. I can’t think of many
benefits
of doing this, other than it might produce a slightly faster load time
to what otherwise would be the first executable to use the lib.

-----Original Message-----
From: Markus Loffler [mailto:> loffler@ces.clemson.edu> ]
Posted At: Wednesday, April 11, 2001 3:06 PM
Posted To: os
Conversation: Permanently loading shared libraries
Subject: Permanently loading shared libraries


Is there a way to prevent unloading a shared library at the
termination
of
the last program that is using it?
Markus

Yes, just when I sent off my message, I realized that this is the way it’s
done…
Thanks anyway
Markus

“Rennie Allen” <RAllen@csical.com> wrote in message
news:D4907B331846D31198090050046F80C903CF81@exchangecal.hq.csical.com

Xphoton is an executable (a server). I’m not sure how the banner is
handled, but being a server, it could simply pop-up the banner the first
time it get’s a connection from a client.

-----Original Message-----
From: Markus Loffler [mailto:> loffler@ces.clemson.edu> ]
Posted At: Friday, April 13, 2001 8:45 AM
Posted To: os
Conversation: Permanently loading shared libraries
Subject: Re: Permanently loading shared libraries


Yes, this was my idea behind it - have it loading faster.
Thanks for your ideas.

Also, I might want to do something like XPhoton - the first time you
load an
x-program, it pops up with a message. The next time it does not do this
anymore…

Is XPhoton a shared library that’s loaded?
So how is it done there then?

Thanks
Markus


“Rennie Allen” <> RAllen@csical.com> > wrote in message
news:> D4907B331846D31198090050046F80C903C8B7@exchangecal.hq.csical.com> …

A simple way to do this is create a tiny program, that references a
symbol in the so, and never terminates. I can’t think of many
benefits
of doing this, other than it might produce a slightly faster load time
to what otherwise would be the first executable to use the lib.

-----Original Message-----
From: Markus Loffler [mailto:> loffler@ces.clemson.edu> ]
Posted At: Wednesday, April 11, 2001 3:06 PM
Posted To: os
Conversation: Permanently loading shared libraries
Subject: Permanently loading shared libraries


Is there a way to prevent unloading a shared library at the
termination
of
the last program that is using it?
Markus

\

Previously, Markus Loffler wrote in qdn.public.qnxrtp.os:

Is there a way to prevent unloading a shared library at the termination of
the last program that is using it?
Markus

Write a little program that simply calls dlopen() on all of its
arguments and then blocks on a MsgReceive() forever. When you want to
unload the DLLs, either kill the program or send it a message.

Andrew