Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2007-07-26 12:53:59

On Jul 26, 2007, at 12:42 PM, Lisandro Dalcin wrote:

>> Be sure to read this thread in order -- the conclusion of the thread
>> was that we now actually *do* return NULL, per POSIX advice.
> OK, I got confused. And now, MPI_Free_mem is going to fail with a NULL
> pointer? Not sure what POSIX says, but then OMPI should also follow it
> advice, right?

It's not going to *fail* -- it's just going to return a NULL pointer
if you ask for 0 bytes. This is perfectly valid according to POSIX's
definition of free(). Also, passing NULL to MPI_FREE_MEM will now
silently succeed (it will currently raise an MPI_ERR_ARG exception).

Jeff Squyres
Cisco Systems