Operating System - HP-UX
1832897 Members
2391 Online
110048 Solutions
New Discussion

Shared Library Size limitation?

 
Ravi Chillikatil
Occasional Contributor

Shared Library Size limitation?

I have a 32 bit application that gets dynamically linked to multiple shared libraries. Time and again, I have run into scenarios wherein, the application hangs whenever it accesses a shared library that is either to large or has too many functions bundled into it.
Example:
I have a shared library that works until its size stays below 20MB, but starts failing once it exceeds that size.
On the other hand, I have another shared library that is only 3MB, however, it has about 100 functions in it. If I try to introduce any new functions into this shared library, the application hangs once again when it accesses this 3MB shared library.
Is there any rule of thumb to follow while designing shared libraries?
Also, is it possible to some tweak the OS (HPUX 11.0) so that I could build one LARGE shared library - say around 100 MB or more, with a thousand or so functions and still work with a 32 bit application?
Can you point me to some reading material that could enlighten me further on this problem?
Thanks,
Ravi
C/C++ Application Developer on HPUX
3 REPLIES 3
Sandip Ghosh
Honored Contributor

Re: Shared Library Size limitation?

How much physical Memory you are having in the box?
What is the size of shmmax in the kernel?
You can look through the gpm or ipcs command that how much shared memory has already been allocated and how much do you need.

Sandip
Good Luck!!!
Ravi Chillikatil
Occasional Contributor

Re: Shared Library Size limitation?

SHMMAX=1073741824

So, SHMMAX is 1 Gig.

I shall lookup the utilities you had recommended Sandip.

If you get any more info on this problem, please let me know.

Ravi
C/C++ Application Developer on HPUX
Ravi Chillikatil
Occasional Contributor

Re: Shared Library Size limitation?

SHMMAX=1073741824
SHMMNI=512
SHMSEG=32

I shall lookup the utilities you had recommended Sandip.

If you get any more info on this problem, please let me know.

Ravi
C/C++ Application Developer on HPUX