1 |
Am 14.10.2012 01:20, schrieb Michael Mol: |
2 |
> On Sat, Oct 13, 2012 at 4:18 PM, Canek Peláez Valdés <caneko@×××××.com> wrote: |
3 |
>> On Sat, Oct 13, 2012 at 2:50 PM, Michael Mol <mikemol@×××××.com> wrote: |
4 |
>> [snip] |
5 |
>>> (Well, I'm not certain that POSIX thinks of threads as parents to each other. |
6 |
>> |
7 |
>> Hence the reason I put "parent" in quotes, and I specified "actually, |
8 |
>> the thread that created it". |
9 |
>> |
10 |
>>> There are *numerous* IPC mechanisms available on Linux. For starters, |
11 |
>>> there are sockets (domain, IPv4, IPv6, et al), named pipes, signals, |
12 |
>>> mmap()'d files, messaging, etc. |
13 |
>> |
14 |
>> Yeah, none of them "easy and quickly" to use, or at least not if you |
15 |
>> compare it with shared memory. |
16 |
> |
17 |
> I assume you mean 'shared memory' in the 'many threads to an address |
18 |
> space', not the /dev/shm sense. |
19 |
> |
20 |
|
21 |
If we really want to be nit-picking, we have to assume 'shared memory' |
22 |
as in malloc'ed [1] or stack memory. Anonymous mmap'ed memory mappings |
23 |
are preserved across forks and changes in them can be shared since |
24 |
kernel 2.4. |
25 |
|
26 |
[1] Yes, I know that malloc uses mmap but its mappings are MAP_PRIVATE. |
27 |
|
28 |
Regards, |
29 |
Florian Philipp |