On Sun, Oct 14, 2012 at 3:19 PM, Florian Philipp <li...@binarywings.net> wrote: > Am 14.10.2012 17:07, schrieb Michael Mol: >> On Sun, Oct 14, 2012 at 5:31 AM, Florian Philipp <li...@binarywings.net> >> wrote: >>> Am 14.10.2012 01:20, schrieb Michael Mol: >>>> On Sat, Oct 13, 2012 at 4:18 PM, Canek Peláez Valdés <can...@gmail.com> >>>> wrote: >>>>> On Sat, Oct 13, 2012 at 2:50 PM, Michael Mol <mike...@gmail.com> wrote: >>>>> [snip] >>>>>> (Well, I'm not certain that POSIX thinks of threads as parents to each >>>>>> other. >>>>> >>>>> Hence the reason I put "parent" in quotes, and I specified "actually, >>>>> the thread that created it". >>>>> >>>>>> There are *numerous* IPC mechanisms available on Linux. For starters, >>>>>> there are sockets (domain, IPv4, IPv6, et al), named pipes, signals, >>>>>> mmap()'d files, messaging, etc. >>>>> >>>>> Yeah, none of them "easy and quickly" to use, or at least not if you >>>>> compare it with shared memory. >>>> >>>> I assume you mean 'shared memory' in the 'many threads to an address >>>> space', not the /dev/shm sense. >>>> >>> >>> If we really want to be nit-picking, we have to assume 'shared memory' >>> as in malloc'ed [1] or stack memory. Anonymous mmap'ed memory mappings >>> are preserved across forks and changes in them can be shared since >>> kernel 2.4. >> >> Absolutely. >> >>> [1] Yes, I know that malloc uses mmap but its mappings are MAP_PRIVATE. >> >> For the GNU libc, yeah. I noticed that in strace, and was amused. >> > > Huh? Are there other libcs that do it differently? I can't imagine any > alternative (except of the sbrk function from the bad old days).
These days, and outside of Windows? I'm not familiar with any. -- :wq