Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] opal_free_list_t annoyance
From: Dave Goodell (dgoodell) (dgoodell_at_[hidden])
Date: 2014-05-28 11:28:59

On May 13, 2014, at 4:01 PM, Nathan Hjelm <hjelmn_at_[hidden]> 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 (, August 2013. I was probably unaware of the "opal_" version at the time, hence the lack of a corresponding fix.