Operating System - HP-UX
1748245 Members
3665 Online
108760 Solutions
New Discussion юеВ

Re: why do shared libraries consume shared memory resources?

 
SOLVED
Go to solution
Byron Myers
Trusted Contributor

why do shared libraries consume shared memory resources?

Why is it that shared libraries are included in the system's global space(maximum total shared memory + shared
libraries + shared memory mapped files for the system is 1.75 GB for 32 bit)? are shared libraries locked in memory?
If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.
2 REPLIES 2
Mike Stroyan
Honored Contributor
Solution

Re: why do shared libraries consume shared memory resources?

It is not that shared libraries consume RAM. Shared library text areas consume address space. The 1.75GB limit on shared objects is the amount of address range that can be used for sharing.
You can actually get more shared memory for specific programs by linking with the -N option and running
chatr -M a.out
That makes the data area start in the first quadrant, then gives the second quadrant to shared memory.
A. Clay Stephenson
Acclaimed Contributor

Re: why do shared libraries consume shared memory resources?

Hi Byron,

Mike has given you the correct answer; this is one of the main reasons you should be looking at 64-bit 11.x unless of course you have legacy applications.
If it ain't broke, I can fix that.