Path: utzoo!attcan!uunet!wuarchive!cs.utexas.edu!sun-barr!decwrl!shelby!csli!poser From: poser@csli.Stanford.EDU (Bill Poser) Newsgroups: comp.unix.wizards Subject: shared memory Keywords: portability Message-ID: <11383@csli.Stanford.EDU> Date: 11 Dec 89 06:55:41 GMT Sender: poser@csli.Stanford.EDU (Bill Poser) Organization: Center for the Study of Language and Information, Stanford U. Lines: 17 In attempting to use shared memory for large (hundreds of KB) objects, I have run into what seem to be nearly insuperable portability problems. At first I was optimistic, as the System V shared memory facilities seem to have spread to most versions of UNIX, without even any differences in syntax. However, I have discovered that two crucial parameters differ widely from system to system and that there appears to be no way to change them other than rebuilding the kernel, which is not always an option. The two parameters are the maximum size of a shared memory segment and the separation between the end of the program's data segment and the virtual address at which shared memory segments are attached. This distance determines the maximum amount of ordinary (non-shared) memory that a program can (s)brk. Am I correct in concluding that one simply cannot use shared memory portably for large objects or if one may need to allocate large amounts of ordinary memory dynamically?