Boost logo

Boost :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2008-06-15 14:53:11

Darren Garvey wrote:
> Hello Ion,
> Title says it all really: the attached mini-program gives me a segmentation
> fault on ubuntu linux 8.04 with gcc 4.2.3 when trying to read back the
> shared memory between process invocations (trying a similar program on XP
> also fails).

The problem is that you are trying to put a type (std::string) that is
not ready for shared memory or memory mapped files because:

1) it surely uses internal raw pointers
2) allocates memory from the heap instead of from the shared memory

That's why Interprocess offers its own containers. See documentation
about those containers and also try to see some tests where interprocess
basic_string is being used. That will give you some clues on how to use
strings in shared memory.

> [*] - named_condition_test.cpp fails because:
> """
> ../../../boost/interprocess/sync/named_condition.hpp:165: error:
> 'external_unlock' was not declared in this scope
> """

Thanks. Solved in trunk.



Boost list run by bdawes at, gregod at, cpdaniel at, john at