Search This Blog

Tuesday, November 3, 2009

Max Application memory size under AIX

First i like to mention a very good article that describe in more details this issue , 64-Bit Addressing for Technical Applications .

In general 32bit application under aix 5.X can use maximum 256M of memory - that not too match, to increase the memory you can use the next parameter while compile your application -bmaxdata.
The default value of maxdata (-bmaxdata:0 or not included in the load command) for 32-bit applications is 256 MB. The maximum allowed for 32-bit applications is 2 GB. For 64-bit applications, the maxdata default value is unlimited. A maximum can be imposed if restrictions are necessary, but a large limit doesn't penalize job or system performance.

These recommendations are applicable to most applications:
32-bit applications: -bmaxdata: 0x80000000 (eight 256 Mbyte segments)
64-bit applications: don't use -bmaxdata; the default is unlimited .

On later versions of AIX 5L (5.1 maintenance release 2 or higher), a new allocation scheme called dsa is available for 32-bit applications. It's specified by:
-bmaxdata:0x80000000/dsa

The difference between the 2 options is as follows:

Large address space model:
-bmaxdata:0x80000000 allows to use 8 segments (2GB) of data.

Very Large Address space model:
-bmaxdata:0xD0000000/dsa

Same as above but dsa = Dynamic Segment Allocation:
Segments are not saved for data area, but are obtained dynamically.
With dsa a program can have maximum 13 segments (3.25GB)

So if you don't need more than 2GB, you don't need dsa option.

read more about Large Program Support.

Now i hope you understand why you are getting yours segmentation fault.

Yaniv T

No comments: