Operating System - HP-UX
1833750 Members
3222 Online
110063 Solutions
New Discussion

memory access limit by 32bit apps

 
SOLVED
Go to solution
Trojan36
Frequent Advisor

memory access limit by 32bit apps

I was told that on HP UX 11.x a 32-bit application cannot access more then 1gb of memory - regardless of what the kernel parameters are set for - unless the app was compiled with a "magic" option. Can anyone confirm this? Thx in advance.
3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: memory access limit by 32bit apps

That is absolutely correct.

Have a look at these whitepapers:

Title: HP-UX Memory Management White Paper, Part I
Document ID: WP1030009A
Last Modified Date: 8/16/02
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062686726

Submitted Date: 8/21/97
Title: HP-UX Memory Management White Paper, Part II
Document ID: WP1030009B
Last Modified Date: 8/22/97
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000009254450


A. Clay Stephenson
Acclaimed Contributor

Re: memory access limit by 32bit apps

That is correct. 32-bit PA-RISC address space is divided into 4 1GB quadrants. The normal compile puts the stack and data space in the same 1GB quadrant so that only if the stack is small will you even be able to approach the 1GB limit. Typically maxssiz should be set to about 32MB and with a maxdsiz of 1GB, you may be able to dynamically allocate 1GB - 32MB of data space. If you have set maxssiz larger the you are robbing Peter to pay Paul. The compiler options (e.g. -N allow data to be allocated from more than 1 quadrant).
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor
Solution

Re: memory access limit by 32bit apps

While it is correct that a plain 32bit program can only allocate 1Gb (actually, about 960megs), you have comiler options and chatr options that can extend these limits. But read the memory management white papers 'cause there's a LOT of limitations.

I have attached a simple C program that can be compiled 5 different ways to show how much memory can be malloc'ed based on compiler and chatr options. As noted in the comments, anything above 1700 megs will require up to date patches, especially on 11.00. A 32bit program can reach as much as 3500 megs but with lots of restrictions. The program can also be compiled as a 64bit program and can allocated dozens to hundreds of Gb. That is the primary reason to use 64bit programs.


Bill Hassell, sysadmin