Operating System - HP-UX
1855752 Members
1421 Online
104103 Solutions
New Discussion

maxdsiz,maxtsiz & maxssiz

 
Moshe Libenson
Occasional Contributor

maxdsiz,maxtsiz & maxssiz

How do you tell HPUX to allocate more then 940MB RAm to a 32bit process.
maxdsize = 2GB,
shmmax = 3GB,
i check the ulimit -a and the memory is set to 2G.
i have a small c program that allocates the amount of memory. i was not able to get more then 940M.
3 REPLIES 3
Santosh Nair_1
Honored Contributor

Re: maxdsiz,maxtsiz & maxssiz

You would have to create a memory window. See the Memory Management whitepaper under /usr/share/doc for more details on how to do this.

-Santosh
Life is what's happening while you're busy making other plans
Wodisch
Honored Contributor

Re: maxdsiz,maxtsiz & maxssiz

Hello Moshe,

I do assume that your system is running 64bits, since your values for the 32bit limits are that high, that a 32bit system would not even boot (AFAIK)...
32bit programs can only use UP TO 1GB - maxssiz and UP TO 1GB of single shared memory segment.
With tricks (chatr and SHMEM_EXE/SHMEM_MAGIC) some application can access up to 2.75GB o 32bit HP-UX, but most cannot (e.g. Oracle).

Sorry,
Wodisch
Bill Hassell
Honored Contributor

Re: maxdsiz,maxtsiz & maxssiz

maxdsiz, maxssiz and maxtsiz are simply fences or limits to prevent programs from growing too large. You can set maxdsiz to 5,000 megs if you want...the kernel won't terminate any 32 bit program due to maxdsiz now.

However, 940 megs is the maximum allowed for all standard 32 bit programs, whether they run in 10.20 or 11.0 32 or 64 bit kernels. This is a quadrant mapping issue. All 32 bit programs have 4 quadrants, each 1Gb in size.

The first quadrant is text (unchanging instructions), and the second is for data. By using EXEC_MAGIC, your program can start the data area in quadrant one and continue through quadrant two, givi ng up to 1900 megs of data space. To create an executable in EXEC_MAGIC format, link the executable with the -N option. (See ld(1) man page for details.)

All the secrets of large memory for 32 bit processes are detailed in:

/usr/share/doc/proc_mgt.txt

Note that you can run very large programs in much less RAM than used by the process, as long as you have enough swap space (aka, virtual memory). However, performance will be pitiful...


Bill Hassell, sysadmin