View Single Post

   
  #3 (permalink)  
Old 01-05-2008, 11:52 AM
Gary R. Hook
 
Posts: n/a
Default Re: putenv for AIX and ifdef for AIX

ClownPleco wrote:
> I have read several posts about putenv is not Standard C. But I'm
> wondering if anyone knows if it is available in AIX. All of our other
> platforms (linux (32 and 64 bit), sgi, hpux, x86, darwin (intel and
> mac), interix and sun) behave properly for our application. We found
> that if we run this command prior to running the application, it works
> correctly:
>
> set LDR_CNTRL=MAXDATA=0x80000000;export LDR_CNTRL
>
> Our problem is that we start a parent process that spawns the child
> application. If we set the LDR_CNTRL=MAXDATA prior to starting the
> parent process, other child applications are failing.


The issue here doesn't appear to be putenv(), it appears to be how
your applications expect the 32-bit address space to be laid out.
The maxdata feature causes segments (usually reserved for shared memory
attaches) to be used for the heap. If your applications perform
shared memory operations and (a) presume to know the location of
an attach, (b) have expectations on specific addresses for an attach,
or (c) require more than 2 simultaneous attaches, then maxdata is not
going to work for you. You might want to just use ldedit to modify
the characteristics of the binary that requires that much heap space,
and leave everything else alone.

--
-------------------------------------
http://www.photo.net/photos/garyrhook
Vocatus atque non vocatus deus aderit
Reply With Quote