Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] mca_base_component_var_register() MCA_BASE_VAR_TYPE_STRING
From: Adrian Reber (adrian_at_[hidden])
Date: 2014-02-14 11:31:31


I am trying to find out how to deal with string variables. Do I have to
allocate the memory before calling mca_base_component_var_register() or
not? It seems it does a strdup() meaning it has to be free()'d while
closing the component. Looking at other occurrences of string variables
I see different usages. Sometimes it set to NULL sometimes not. Before
following a wrong example maybe someone can tell me what the correct
usage is.

                Adrian