1
1
openmpi/opal/mca/memory/ptmalloc2/opal_ptmalloc2_component.c

65 строки
2.0 KiB
C
Исходник Обычный вид История

/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "opal_config.h"
#include "opal/mca/memory/memory.h"
#include "opal/memoryhooks/memory.h"
static int opal_memory_ptmalloc2_open(void);
const opal_memory_base_component_1_0_0_t mca_memory_ptmalloc2_component = {
/* First, the mca_component_t struct containing meta information
about the component itself */
{
/* Indicate that we are a memory v1.0.0 component (which also
implies a specific MCA version) */
OPAL_MEMORY_BASE_VERSION_1_0_0,
/* Component name and version */
"ptmalloc2",
OPAL_MAJOR_VERSION,
OPAL_MINOR_VERSION,
OPAL_RELEASE_VERSION,
/* Component open and close functions */
opal_memory_ptmalloc2_open,
NULL
},
/* Next the MCA v1.0.0 component meta data */
{
/* The component is checkpoint ready */
MCA_BASE_METADATA_PARAM_CHECKPOINT
},
};
static int
opal_memory_ptmalloc2_open(void)
{
/* we always provide munmap support as part of libopen-pal.la.
Will also provide malloc/free support if user linked us in. In
that case, we've already likely called set_support, so don't
crush what has already been done */
if (0 == opal_mem_hooks_support_level()) {
opal_mem_hooks_set_support(OPAL_MEMORY_MUNMAP_SUPPORT);
}
return OPAL_SUCCESS;
}