Boost logo

Boost Users :

Subject: Re: [Boost-users] [interprocess] Memory deallocation doesn't seem to work
From: Stephan Menzel (stephan.menzel_at_[hidden])
Date: 2009-09-23 11:15:22


Just an update

On Wed, Sep 23, 2009 at 3:43 PM, Stephan Menzel
<stephan.menzel_at_[hidden]> wrote:
> ptr = m_segment->allocate_aligned(static_cast<size_t>(rawsize), 128);
>
> Now after a while the segment will have no more room for further
> blocks. So I delete some of them to gain more room:
>
> m_segment->deallocate(raw.get());
...

> This makes me believe that either deallocate didn't do a good job...

Actually it just turned out this is the case. I tried among many other
things replacing the allocate_aligned() with an ordinary allocate()
and this works. So I'm afraid this looks a lot like a bug in
interprocess to me. Pointers returned by allocate_aligned are aligned
but cannot be deallocated. At least not in a way that would have the
mem actually available afterwards.

HTH,
Stephan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net