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.

From: Lisandro Dalcin (dalcinl_at_[hidden])
Date: 2007-07-24 12:02:14

> Per Lisandro's comments: I think that if you need a random/valid
> value for an STL map (or similar), malloc(0) is not a good idea to
> use as a key.

OK, regarding comments in this thread, you are completelly right. I am
fine with returning NULL.

BTW, should'nt this issue be commented in the standard? Perhaps in the
errata document? I think there is no a strong need to make it
implementation dependent.

MPI-2 could mandate/suggest that if size=0, the returned pointer is
NULL, but then MPI_Free_mem with a NULL pointer should succeed.

Now a question: What about Fortran ?

Lisandro Dalcín
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594