On Wed, May 28, 2014 at 03:28:59PM +0000, Dave Goodell (dgoodell) wrote: > On May 13, 2014, at 4:01 PM, Nathan Hjelm <hje...@lanl.gov> wrote: > > > While tracking down memory leaks in components I ran into an interesting > > issue. osc/rdma uses an opal_free_list_t (not an ompi_free_list_t) for > > buffer fragments. The fragment class allocates a buffer as part in the > > constructor and frees the buffer in the destructor. The problem is that > > the item constructor is called but the destructor is never called. > > > > I looked into the issue and I see what is happening. When growing the free > > list we call the constructor for each item we allocate (see > > opal_free_list.c:113) but the free list destructor does not invoke the > > destructor. This is different from ompi_free_list_t which does invoke > > the destructor on each constructed item. > > > > The question is. Is this difference intentional? It seems a little odd > > that the free list does not call the item destructor given that it > > calls the constructor. If this is intentional is there a reason for this > > behavior? If not I plan on "fixing" the opal_free_list_t destructor to > > call the item destructor. > > The difference is not intentional, AFAIK. I fixed the "ompi_" version back > in r29096 (https://svn.open-mpi.org/trac/ompi/changeset/29096), August 2013. > I was probably unaware of the "opal_" version at the time, hence the lack of > a corresponding fix.
Excellent. That was the answer I was looking for. We already made the equivalent fix and it has been applied to 1.8.2. Thanks Dave. -Nathan
pgp2nrtO7I2_U.pgp
Description: PGP signature