Subject: CGAL users discussion list
List archive
- From: Marc Glisse <>
- To: Alexander Kobel <>
- Cc:
- Subject: Re: [cgal-discuss] Gmpfi: a black hole for memory?
- Date: Wed, 15 Dec 2010 10:43:11 +0100 (CET)
On Wed, 15 Dec 2010, Alexander Kobel wrote:
Thanks, Marc, for your reply.
On 2010-12-15 10:03, Marc Glisse wrote:
On Wed, 15 Dec 2010, Alexander Kobel wrote:
I suspect that the CGAL::Gmpfi interval number type is severely
leaking memory.
So it is.
:-) Does that mean: "Uh, that's bad, but that guy's right - let's do something about it", or "Yeah, yeah, we all know, but nobody has enough time and motivation to fix this"?
This is a recent package that hasn't seen much use yet, so you may be the first to have noticed the leak. It seems like, the way the code is currently written, Gmpfr is missing a steal-ownership constructor from mpfr_t, that would be used by a similar Gmpfi constructor. But I'll let someone who knows the code deal with it (hopefully).
While you are here, I am sure the author would be interested to know what you are using it for...
Does using -DCGAL_GMPFR_NO_REFCOUNT reduce the leaking? (Note that it
isn't a real fix, it may just work around some of the leaky code paths)
Yes, this seems to work fairly well, with no leakage at all and minor speed impact.
In programs where the proper precautions are taken to avoid unnecessary copies, disabling the reference counting should not have a significant impact on the performance, right?
No better way to know than measuring (when you can).
--
Marc Glisse
- [cgal-discuss] Gmpfi: a black hole for memory?, Alexander Kobel, 12/15/2010
- Re: [cgal-discuss] Gmpfi: a black hole for memory?, Marc Glisse, 12/15/2010
- Re: [cgal-discuss] Gmpfi: a black hole for memory?, Alexander Kobel, 12/15/2010
- Re: [cgal-discuss] Gmpfi: a black hole for memory?, Marc Glisse, 12/15/2010
- Re: [cgal-discuss] Gmpfi: a black hole for memory?, Eric Berberich, 12/15/2010
- Re: [cgal-discuss] Gmpfi: a black hole for memory?, Alexander Kobel, 12/15/2010
- Re: [cgal-discuss] Gmpfi: a black hole for memory?, Marc Glisse, 12/15/2010
Archive powered by MHonArc 2.6.16.