[patch] 2Gb SYSVSHM limitation

Christian S.J. Peron csjp at FreeBSD.org
Wed May 25 12:39:34 PDT 2005


I am looking for a review and testers for a fix to the 2 Gig memory
limitation when allocating system V shared memory segments.

A couple of notes:

1) This patch breaks ABI because it changes the size of the shminfo
   structure. This means that ipcs will need to be recompiled. (and
   anything else which uses struct shminfo).

2) Because this changes the size limitations stored in struct shminfo from
   a signed integer to an unsigned long, it allows x86 to allocate up
   to 4 gigs and also allows 64 bit architectures to do far more.

Even though the size parameter used by shmget(2) is a size_t, the upper
size limit is currently stored in a signed int. Limiting the maximum size of an
allocation to 2147483647 bytes.

Patch can be downloaded from:

http://people.freebsd.org/~csjp/bigsharedmem.1117028863.diff

Should apply to any recent version of -CURRENT cleanly.

Thanks!

-- 
Christian S.J. Peron
csjp at FreeBSD.ORG
FreeBSD Committer


More information about the freebsd-current mailing list