shmat() system call?

Suu Quan quan at hpcc01.HP.COM
Fri Aug 17 05:39:15 AEST 1990


/ hpcc01:comp.unix.wizards / jeff at astph.UUCP (8592x2) /  1:11 pm  Aug 15, 1990 /
>
>Question concerning the shared memory attach call:
>
>I need to know if additional attaches by other processes will be
>guaranteed to return the same address as that the first process
>was returned. I am aware that you can request a particular address,
>but why bother communicating that information between the processes
>if the same address is returned anyway? I would appreciate any
>answers or direction to documentation.

In spite of other positive answers, the real answer is NO.

The exactly same program, run on different kernels, will most probably
result in different attached address. The attached address depends on
too many different kernel parameters to discuss here in a few lines.

On the other hand, if you want to request a particular address, the down
side of it is that you don't know whether any other applications has used
that segment of address or not. This practice is definitely not recommended.



More information about the Comp.unix.wizards mailing list