Re: Memory sharing question

From: Alan
Date: Sat Feb 24 2007 - 07:49:30 EST


> with the address as the "start" parameter and MAP_FIXED. However, that
> tends to fail, and MAP_FIXED can have annoying side-effects (killing
> off other mappings).

MAP_FIXED requires you know in advance a good place to put the memory,
which isn't too hard with some planning but does get fairly platform
specific and requires good knowledge.

> The point of all this is that I want to pass a large, complex (full of
> pointers) data structure to a different process, and I don't want the
> overhead of serialising it down a socket and then parsing it at the
> other end (the data structure's pretty big, and the other process
> won't need it all). Is this possible?

You can also just use relative pointers, which is actually pretty fast on
most modern processors
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/