Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] RFC : what is the best way to fix the memory leak in mca/pml/bfo
From: Gilles Gouaillardet (gilles.gouaillardet_at_[hidden])
Date: 2014-05-16 01:57:23


Folks,

there is a small memory leak in ompi/mca/pml/bfo/pml_bfo_component.c

in my environment, this module is not used.
this means mca_pml_bfo_component_open() and mca_pml_bfo_component_close()
are invoked but
mca_pml_bfo_component_init() and mca_pml_bfo_component_fini() are *not*
invoked.

mca_pml_bfo.allocator is currently allocated in
mca_pml_bfo_component_open() and released in mca_pml_bfo_component_fini()
this causes a leak (at least in my environment, since
mca_pml_bfo_component_fini() is not invoked)

One option is to release the allocator in mca_pml_bfo_component_close()
An other option is to allocate the allocator in mca_pml_bfo_component_init()

Which is the correct/best one ?

i attached two patches, which one (if any) should be commited ?

Thanks in advance for your insights

Gilles