2004-01-10 11:22:06 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-01-10 11:22:06 +03:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "mpi.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mpi/c/bindings.h"
|
2004-01-10 11:22:06 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
2004-01-15 09:08:49 +03:00
|
|
|
#pragma weak MPI_Free_mem = PMPI_Free_mem
|
2004-01-10 11:22:06 +03:00
|
|
|
#endif
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if OMPI_PROFILING_DEFINES
|
2004-04-20 22:50:43 +04:00
|
|
|
#include "mpi/c/profile/defines.h"
|
|
|
|
#endif
|
|
|
|
|
2004-01-10 11:22:06 +03:00
|
|
|
|
|
|
|
int MPI_Free_mem(void *baseptr)
|
|
|
|
{
|
2004-01-11 00:32:32 +03:00
|
|
|
if (NULL == baseptr) {
|
2004-01-10 11:22:06 +03:00
|
|
|
/* Return error on MPI_COMM_WORLD */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Look and see if this pointer was allocated with a specific
|
|
|
|
MPI_Info that got the memory from a module's alloc_mem function.
|
|
|
|
If so, call the module's corresponding free_mem function.
|
|
|
|
Otherwise, call free().
|
|
|
|
|
|
|
|
If either fails, return an error on MPI_COMM_WORLD. */
|
|
|
|
|
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|