1
1
openmpi/src/mpi/interface/c/free_mem.c
Jeff Squyres 5d54543fd7 Add MPI_Alloc_mem and MPI_Free_mem
This commit was SVN r201.
2004-01-10 08:22:06 +00:00

31 строка
603 B
C

/*
* $HEADER$
*/
#include "lam_config.h"
#include <stdio.h>
#include "mpi.h"
#if LAM_WANT_MPI_PROFILING && LAM_HAVE_WEAK_SYMBOLS
#pragma weak PMPI_Free_mem = MPI_Free_mem
#endif
int MPI_Free_mem(void *baseptr)
{
if (baseptr == NULL) {
/* 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;
}