diff options
author | kib <kib@FreeBSD.org> | 2009-03-02 18:53:30 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-03-02 18:53:30 +0000 |
commit | 453adb14fb8994d00a14b341bcf886ca9aad1d9e (patch) | |
tree | 126cfd157183d3118e00026a6f63a55085a27d45 /lib/libc | |
parent | c672211541895fab644fcd12bb285ea5294f85f5 (diff) | |
download | FreeBSD-src-453adb14fb8994d00a14b341bcf886ca9aad1d9e.zip FreeBSD-src-453adb14fb8994d00a14b341bcf886ca9aad1d9e.tar.gz |
Correct types of variables used to track amount of allocated SysV shared
memory from int to size_t. Implement a workaround for current ABI not
allowing to properly save size for and report more then 2Gb sized segment
of shared memory.
This makes it possible to use > 2 Gb shared memory segments on 64bit
architectures. Please note the new BUGS section in shmctl(2) and
UPDATING note for limitations of this temporal solution.
Reviewed by: csjp
Tested by: Nikolay Dzham <i levsha org ua>
MFC after: 2 weeks
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/shmctl.2 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/sys/shmctl.2 b/lib/libc/sys/shmctl.2 index 90c61c9..3e19666 100644 --- a/lib/libc/sys/shmctl.2 +++ b/lib/libc/sys/shmctl.2 @@ -133,6 +133,15 @@ the shared memory segment's owner or creator. Permission denied due to mismatch between operation and mode of shared memory segment. .El +.Sh "BUGS" +The shm_segsz member of the +.Vt shmid_ds +structure has int type, that is too short to represent full range +of the values for segment size, which is allowed to be size_t. +If shared memory limits are raised to allow segments with size > 2 Gb +to be created, be aware that IPC_STAT call may return truncated value +for shm_segsz. +.El .Sh "SEE ALSO" .Xr shmat 2 , .Xr shmdt 2 , |