Re: STL allocator for shared memory
- From: "Joe" <joe@xxxxxxxxxx>
- Date: Thu, 18 Aug 2005 12:29:29 -0700
The problem will be that you have no control over how memory is utilized,
and more than likely an STL-allocated object will contain pointers -- when
stored in shared memory by the process that created the object these
pointer-values will be valid addresses, but not when accessed by other
processes. Pointers stored in shared-memory need to be stored as offsets
from the base of shared memory.
<sutphinwb@xxxxxxxxxxxxx> wrote in message
news:%23TMZ4$5nFHA.3564@xxxxxxxxxxxxxxxxxxxxxxx
> Hi
>
> I'd like to be able to use an STL map (or vector) with a chunk of win32
> shared memory. I can handle the multithreading issues (but of course if
> there is an allocator around to do it ...). I could even use a pool as
the
> objects I want to stick in there are all one size. Anyone know of such an
> allocator? I am not STL savvy.
>
> Thanks
>
> Bill
>
>
.
- Follow-Ups:
- Re: STL allocator for shared memory
- From: Tom Widmer [VC++ MVP]
- Re: STL allocator for shared memory
- References:
- STL allocator for shared memory
- From: sutphinwb
- STL allocator for shared memory
- Prev by Date: Re: SIGSEGV exception inside _fpreset
- Next by Date: Re: Trade-offs when floating poing consistency?
- Previous by thread: RE: STL allocator for shared memory
- Next by thread: Re: STL allocator for shared memory
- Index(es):
Relevant Pages
|