Operating System - HP-UX
1833004 Members
2986 Online
110048 Solutions
New Discussion

Shared library size limitation?

 
Ravi Chillikatil
Occasional Contributor

Shared library size limitation?

Hi,

I am trying to build a huge shared library (about 100 MB) on a 11.0 HPUX OS, HP9000 server. I have 3 Gig of RAM on this server.
However, when I link my 32 bit application to this shared library, I run into all kinds of problems.
Is there a size limitation on Shared Libraries on HPUX 11.0?
Where can I get in-depth coverage on this topic?
I did receive some help from Sandip on this topic, but wanted more details...

On my server, the Shared Memory configuration is as follows:
SHMMAX=1073741824
SHMMNI=512
SHMSEG=32

Thanks in advance for your help.
Ravi
C/C++ Application Developer on HPUX
7 REPLIES 7
Krishna Prasad
Trusted Contributor

Re: Shared library size limitation?

The limit for 32 bit is 1.75 GB if you have 4 GB of memory on the machine.

You will also have to have enough swap space. It looks like your shared memory max is correct. Are you sure you are 32bit? If you are 64bit shmmax_64bit needs to be set correctly.

What also could be limiting you is other applications on the machine. If other applications are running and you don't have enough contingous memory availbale in a memory quadrant it will fail. This is seen more often on 32bit systems and apps. Also check your max_dsize kernel setting. Also if you have other systems on the box shmsegs could be low.

Other then that you should be able to get 100 MB. It is actually small.
Positive Results requires Positive Thinking
Ravi Chillikatil
Occasional Contributor

Re: Shared library size limitation?

Thanks for the insight Ron.

I am sure it is a 32 bit OS and application. And the only other significant application that is running on this server is Oracle version 8.1.7.

Can you send me an optimal set of kernel parameters based on the above?

I shall tweak the parameters you mentioned earlier and see if that makes a difference.

It is good to know that 100MB is NOT too big!

Shall keep plugging away at it on my end.
C/C++ Application Developer on HPUX
Sandip Ghosh
Honored Contributor

Re: Shared library size limitation?

You can have a look over here before configuring your memory.

http://www.docs.hp.com//hpux/onlinedocs/os/11i/mem_mgt.html#vhand,%20the%20pageout%20daemon

Sandip
Good Luck!!!
Ravi Chillikatil
Occasional Contributor

Re: Shared library size limitation?

Thanks Sandip, I shall read the White Paper you forwarded to me.
C/C++ Application Developer on HPUX
Krishna Prasad
Trusted Contributor

Re: Shared library size limitation?

Do you know how much memory Oracle is using?
Or is it Oracle that is asking for the 100 MG.

Attached my system file on a Server that runs SAP/Oracle in a 64bit mode.
Positive Results requires Positive Thinking
Steven Gillard_2
Honored Contributor

Re: Shared library size limitation?

I've never seen any documented limitation in shared libraries before, and I've certainly never encountered these types of problems (although I don't think I've ever used a library of 100Meg!). If you were running into a memory limit I would expect the dynamic loader to return an error and abort your application.

First thing to do is install patch PHSS_24303 which is the ld and linker tools patch - perhaps you've hit a bug there.

The best source of information is the linker and libraries manual, but I don't think there's any indication of a size limit on a shared library. You can get this manual at:

http://docs.hp.com/hpux/onlinedocs/dev/B2355-90730/B2355-90730.html

If you still get the problem after installing the patch, try running a tusc trace or using a debugger like wdb on the program to see if that sheds any light on things. After that it might be time to log a call with HP - for which you'll probably want some sort of test case that can be easily sent to them.

Regards,
Steve
Krishna Prasad
Trusted Contributor

Re: Shared library size limitation?

Also how much free memory do you have when you try to get your shared memory segement?
Positive Results requires Positive Thinking