AIX-specific memory issues?

Hi,

Does anyone here write cross-platform applications to be run on different Unix variants?

For some reason, an application I'm working with, when being run on machines with similar specifications, I run into "cannot allocate" errors (St9bad_alloc) on AIX but not on other platforms. Is it a common happening?
:confused:

The application is written in C++, compiled with gcc with -maix64 on.

Thanks!

Memory allocation and AIX .... a never ending story. Want some good reading? Try the following redbooks. Start with
IBM Redbooks | AIX 5L Porting Guide
and expand the information with
IBM Redbooks | Developing and Porting C and C++ Applications on AIX

Enjoy!

Thanks!

Are you implying that memory allocation issues on AIX is commonplace even when the same compiler is used on the same application run on machines with roughly the same amount of physical memory and swap space?

Thanks!

Are you implying that memory allocation issues are commonplace on AIX even if the same application is compiled with the same compiler and run on comparable hardware - the fact that it's run on AIX will introduce memory allocation issues if you're not careful?

Not quite - it is just often described as different compared to other operating systems which allegedly all behave identical. So there seems to be a lack of information about the differences and if you search the internet you will probably find many threads related to this issue. Once you get used to the way it is handled by AIX there should not be any "commonplace" problem.

Hmm, like shockneck i am no software developer, but i heard more than one programmer sigh when it came to AIX memory management. While i can't explain concisely where the problem is i got it there must be several and severe problems, otherwise the unisono reaction wouldnt have been like it was.

It is a pity that there are mostly sysadmins here and only very few programmers. Probably you won't get any better answers than these somewhat vague warnings here. Perhaps the Redbooks shockneck mentioned will contain some relevant information. I'd be glad if you could share your knowledge after reading here.

bakunin

It seems I'll have to experiment more. Will share results.

Post the error messages you are getting.
See if your swap is over allocated? Compare it with the swap space allocation on other OSes.
Post a snapshot of the memory usage on your system using vmstat.

Turns out that it's the default soft RLIMIT_DATA being hit. I mistakenly thought that ulimit would only affect 32-bit executables, and it seems the machine I'm working with in particular has a really low soft limit. Once it is raised to match the hard limit things started to work fine. Thanks a lot!