[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    Re: HPUX-DEVTOOLS: Exceeding the 1GB Shared Memory Barrier
From:       Mike Stroyan <stroyan () hpstryn ! fc ! hp ! com>
Date:       2000-05-17 16:49:37
[Download RAW message or body]


| If I have shmmax set to 2GB and shmmni set to 1024, and I have 4GB of physical
| ram, will my 32 bit application, statically built from archived libraries be
| able to create 2 shared memory segments of size 1GB and 500MB and attach to
| both?  This would total at 1.5GB of shared memory space for each process
| attaching.
| 
| All the HP documentation on memory I can find indicates that the shared memory
| quadrant is 1GB (0xc0000000 ->) but that total shared memory accessible by a
| process is 1.75GB.
| 
| Do I have to do anything to my execuable to allow my executing users to attach
| the 1.75GB max shared memory?

  Because shared memory addresses are system-wide resource, your
application by have trouble getting big segment because of other uses of
addresses.  Shared libraries and shared memory segments in other processes
can use up address ranges that affect your process.  Even small segments
might end up in the middle of a big range, preventing the creation of really
big segments.

  There is one step that you can take on both 10.20 and 11.0 to make more
address ranges available to your process.  If you link with "ld -N" the
linker will move both code and data into the first 1GB quadrant.  That
normally allows malloc data to use both the first and second quadrant.
If you also use "chatr -M" on your program files then the second quadrant
is changed from a malloc data area to a potential shared memory area.  That
will limit your code and data to a 1GB limit, but allow another 1GB of
shared memory.  The second quandrant shared memory is only accessible from
processes that use the "chatr -M" setting.  That means that there is a lot
less competition for those shared address ranges.  It also means that you
MUST use the setting on all executables that need to map that shared memory.

  The 11.0 release has another mechanism for reducing competition for shared
memory address ranges.  The "shared memory windows" technique causes different
groups of processes to see different sets of shared memory segments in the
third quadrant.  You can read more about that in /usr/share/doc/mem_wndws.txt
in the 11.0 release.

Mike Stroyan, mike_stroyan@fc.hp.com
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic