[Dune] [Fwd: Re: Memory leak, valgrind check, Dune]
Martin Nolte
nolte at mathematik.uni-freiburg.de
Thu Oct 8 16:11:39 CEST 2009
Hi Oliver,
I don't know much about the PoolAllocator, but I can tell you this:
* SmallObjectPool does not implement a std::allocator interface.
* SmallObjectPool provides storage (of type void*) for small objects.
It does not care about the object's type (ok, the object may not be
larger than 64k). As far as I understand, the PoolAllocator allocates
a single type of object.
* Performance of both allocators seems to be similar (see test).
As to why have both: The SmallObjectPool is needed to provide the memory for
the new / delete implementation of SmallObject. If you can do the same with
the PoolAllocator I'm all for using only one such pool. I think that the
SmallObjectPool would have to remain as the singleton instance that collects
all PoolAllocators, though. So I answer your question with two questions of mine:
a) Is the PoolAllocator bug free by now (see problem with slist)?
b) Is there someone to implement this (I certainly don't understand enough of
the PoolAllocator to do so)?
Yours,
Martin
Oliver Sander wrote:
> This was intended to go to the list as well.
>
> -------- Original-Nachricht --------
> Betreff: Re: [Dune] Memory leak, valgrind check, Dune
> Datum: Thu, 08 Oct 2009 14:18:38 +0200
> Von: Oliver Sander <sander at mi.fu-berlin.de>
> An: Martin Nolte <nolte at mathematik.uni-freiburg.de>
> Referenzen: <0C9CAFE8C4E5CA49884E636AE1D7CD690358D849 at MAILBOX0B.psi.ch>
> <4ACDCE2A.6070109 at mi.fu-berlin.de>
> <4ACDD580.9060800 at mathematik.uni-freiburg.de>
>
>
>
> Hi Martin!
> Thanks, but could you please be a bit more concrete? Do the two classes
> really both
> - implement pool allocator functionality
> - implement the std::allocator interface
> - are equally efficient?
>
> If yes, why do we have both? I am not convinced that the PoolAllocator
> really
> works, either (see FS 493). I'd rather not waste more time on debugging it
> if it can be replaced by SmallObjectPool.
>
> Oliver
>
>
> Martin Nolte schrieb:
>> Hi Oliver,
>>
>> to my knowledge the outcome was simple: If somebody is able to build the
>> memory allocation of SmallObject using the PoolAllocator, he may feel free to
>> do so.
>>
>> Just a word of warning: The Mappings of the GenericGeometry are SmallObjects.
>> Any errors in the memory allocation will have effects in dune-grid (at least
>> in the reference element). And I'm still not convinced that the PoolAllocator
>> really works...
>>
>> Martin
>>
>> Oliver Sander wrote:
>>
>>> BTW: I faintly remember a discussion about the respective benefits of
>>> PoolAllocator and
>>> SmallObjectPool. What was the outcome? Is there a good reason to
>>> have/debug both?
>>>
>>> --
>>> Oliver
>>>
>>> Oswald Benedikt schrieb:
>>>
>>>> Hi Dune, I just sent a mail concerning all the details of our memory leak problem to the
>>>> mailing list but it appears to be stuck somewher waiting for 'Moderator Approval' ?
>>>>
>>>> In particular, I sent the complete valgrind outputs for both Mac OS X and Linux.
>>>>
>>>> Have a revolutionary day, Benedikt
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------------------------------------------
>>>> Benedikt Oswald, Dr. sc. techn., dipl. El. Ing. ETH, www.psi.ch, Computational Accelerator Scientist
>>>> Paul Scherrer Institute (PSI), CH-5232 Villigen, Suisse, benedikt.oswald at psi.ch, +41(0)56 310 32 12
>>>> "Passion is required for any great work, and for the Revolution passion and audacity are required in big doses.",
>>>> Ernesto 'Che' Guevara, Letter to his parents.
>>>> http://maxwell.psi.ch/amaswiki/index.php/User:BenediktOswald
>>>> ------------------------------------------------------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Dune mailing list
>>>> Dune at dune-project.org
>>>> http://lists.dune-project.org/mailman/listinfo/dune
>>>>
>>>>
>>>
>>
>
>
--
Martin Nolte <nolte at mathematik.uni-freiburg.de>
Universität Freiburg phone: +49-761-203-5642
Abteilung für angewandte Mathematik fax: +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany
More information about the Dune
mailing list