[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Single Page

Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.23: What is Linker TOC overflow error 12?
Next Document: 2.25: I deleted libc.a by accident --- how do I recover?


2.24: What is the limit on number of shared memory segments I can attach?



Each process has 16 segments.  One is used for private code, one for
stack, one for heap; those, if memory serves, are segments 0, 1, and
2.  (If you look in sys/shm.h, you'll see that SHMLOSEG is 3 -- the
lowest segment, in number and in the process' virtual address space,
available to shmat.)

SHMHISEG, the highest segment you can attach to (also defined in
sys/shm.h), is 12.  Segments 3 through 12 are available to shmat,
giving the 10 segments your program used successfully.  (NSHMSEGS in
sys/shm.h will give you this value, though it's of limited use, since
most platforms that I've seen don't define it.)

Segment 13 is used by shared code your program has attached to;
I think one of the others might be for kernel-mode data.

See also mmap.



Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.23: What is Linker TOC overflow error 12?
Next Document: 2.25: I deleted libc.a by accident --- how do I recover?

Part1 - Part2 - Part3 - Part4 - Part5 - Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
bofh@mail.teleweb.pt (Jose Pina Coelho)

Last Update October 22 2009 @ 05:22 AM

Some parts © 2009 Advameg, Inc.