Re: STL allocator for shared memory

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
>
>


.



Relevant Pages

  • Re: Is this math test too easy?
    ... communications glitch; one of the more laughable cartoons ... (A note on "in memory", which for virtual memory machines can get ... Or one can interpret the character string as one of the values ... DOS allowed NULL pointers; the value was in fact interpreted as ...
    (sci.math)
  • [PATCH 2.6.17-rc4 2/6] Some documentation for kmemleak
    ... +Kernel Memory Leak Detector ... +with the difference that the orphan pointers are not freed but only ... +An allocated block of memory is considered orphan if a pointer to its ... The memory allocations hook stores the pointer address together ...
    (Linux-Kernel)
  • [PATCH 2.6.17-rc5 2/7] Some documentation for kmemleak
    ... +Kernel Memory Leak Detector ... +with the difference that the orphan pointers are not freed but only ... +An allocated block of memory is considered orphan if a pointer to its ... The memory allocations hook stores the pointer address together ...
    (Linux-Kernel)
  • [PATCH 2.6.17-rc5 2/8] Some documentation for kmemleak
    ... +Kernel Memory Leak Detector ... +with the difference that the orphan pointers are not freed but only ... +An allocated block of memory is considered orphan if a pointer to its ... The memory allocations hook stores the pointer address together ...
    (Linux-Kernel)
  • [PATCH 2.6.17-rc5 2/8] Some documentation for kmemleak
    ... +Kernel Memory Leak Detector ... +with the difference that the orphan pointers are not freed but only ... +An allocated block of memory is considered orphan if a pointer to its ... The memory allocations hook stores the pointer address together ...
    (Linux-Kernel)