This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: memory management issues


On Wed, Apr 8, 2009 at 8:03 PM, Bertani, John A <john.bertani@hp.com> wrote:
> We are having a problem with memory allocations and deallocations that are smaller than 32 Mb. It appears that these small allocations are leaking even though Valgrind shows no leaks and even though we have done extensive desk-checking and logging to verify that we are performing the allocations and deallocations correctly.

Could you please provide the following:
1) Reduced testcase with instructions on how to build and run the testcase
2) Observed behaviour.
3) Expected behaviour, and why you expect this behaviour.

Please note that calling delete does not force the underlying
allocator to release system memory. The underlying allocator might
mark deleted memory as "free for reuse", in fact this is exactly what
the glibc arena allocator does. If you need the allocator to have
specific semantics then I suggest you implement your override malloc
or new with your own slab allocator.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]