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.
- application/pgp-signature attachment: stored