Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [OMPI svn-full] svn:open-mpi r20568
From: George Bosilca (bosilca_at_[hidden])
Date: 2009-02-17 11:18:25


I guess that if the free function supports the NULL pointer we should
do the same...

   george.

On Feb 17, 2009, at 07:35 , Jeff Squyres wrote:

> On Feb 16, 2009, at 9:16 PM, George Bosilca wrote:
>
>> Based on several man pages, free is capable of handling a NULL
>> argument. What is really puzzling is that on your system it
>> doesn't ...
>>
>> I tried on two system a 64 bits Debian and on my MAC OS X with all
>> memory allocator options on, and I'm unable to get such a warning :(
>
> Remember that the warning is in our code -- opal/util/malloc.c:
>
> -----
> void opal_free(void *addr, const char *file, int line)
> {
> #if OMPI_ENABLE_DEBUG
> if (opal_malloc_debug_level > 1 && NULL == addr) {
> opal_output(opal_malloc_output, "Invalid free (%s, %d)",
> file, line);
> return;
> }
> #endif /* OMPI_ENABLE_DEBUG */
> free(addr);
> }
> -----
>
> Are you saying that we should remove this warning?
>
> --
> Jeff Squyres
> Cisco Systems
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel