1
1

Remove the mallopt component (accidentally missed in r20921); refs

#1853.

This commit was SVN r20922.

The following SVN revision numbers were found above:
  r20921 --> open-mpi/ompi@0d52271cd6
Этот коммит содержится в:
Jeff Squyres 2009-04-01 18:02:08 +00:00
родитель 0d52271cd6
Коммит 7aa431882c
4 изменённых файлов: 0 добавлений и 265 удалений

Просмотреть файл

@ -1,25 +0,0 @@
#
# Copyright (c) 2004-2005 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$
#
noinst_LTLIBRARIES = libmca_memory_mallopt.la
# Source code files
libmca_memory_mallopt_la_SOURCES = \
memory_mallopt_component.c
libmca_memory_mallopt_la_LIBADD = \
$(memory_mallopt_LIBS)

Просмотреть файл

@ -1,103 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 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$
#
AC_DEFUN([MCA_memory_mallopt_COMPILE_MODE], [
AC_MSG_CHECKING([for MCA component $2:$3 compile mode])
$4="static"
AC_MSG_RESULT([$$4])
])
# MCA_memory_mallopt_CONFIG(action-if-can-compile,
# [action-if-cant-compile])
# ------------------------------------------------
AC_DEFUN([MCA_memory_mallopt_CONFIG],[
AS_IF([test "$with_memory_manager" = "mallopt"],
[memory_mallopt_happy="yes"
memory_mallopt_should_use=1],
[memory_mallopt_should_use=0
AS_IF([test "$with_memory_manager" = ""],
[memory_mallopt_happy="yes"],
[memory_mallopt_happy="no"])])
AS_IF([test "$memory_mallopt_happy" = "yes"],
[AC_CHECK_HEADER([malloc.h], [], [memory_mallopt_happy="no"])])
AS_IF([test "$memory_mallopt_happy" = "yes"],
[AC_CHECK_FUNCS([mallopt], [], [memory_mallopt_happy="no"])])
AS_IF([test "$memory_mallopt_happy" = "yes"],
[memory_mallopt_munmap=0
AC_CHECK_HEADER([syscall.h],
[AC_CHECK_FUNCS([syscall], [memory_mallopt_munmap=1])])
AC_CHECK_FUNCS([__munmap], [memory_mallopt_munmap=1])
# only allow dlsym (and therefore add -ldl) if the others
# were not found
AS_IF([test "$memory_mallopt_munmap" = "0"],
[AC_CHECK_LIB([dl],
[dlsym],
[memory_mallopt_LIBS="-ldl"
# Set HAVE_DLSYM
memory_mallopt_LIBS_SAVE="$LIBS"
LIBS="$LIBS -ldl"
AC_CHECK_FUNCS([dlsym])
LIBS="$memory_mallopt_LIBS_SAVE"
# Since we have dlsym, check that we also have
# RTLD_NEXT (cygwin has dlsym but not RTLD_NEXT
# -- see
# https://svn.open-mpi.org/trac/ompi/ticket/1618).
# If we don't have RTLD_NEXT, then skip this
# method.
AS_IF([test "$memory_mallopt_munmap" = "1"],
[AC_CHECK_HEADER([dlfcn.h],
[AC_DEFINE(HAVE_DLFCN_H)
AC_CHECK_DECLS([RTLD_NEXT], [],
[memory_mallopt_munmap=0],
[AC_INCLUDES_DEFAULT
[#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif]]
)
])
])
])
])
AS_IF([test "$memory_mallopt_munmap" = "0"],
[memory_mallopt_happy="no"])])
AS_IF([test "$memory_mallopt_happy" = "yes"],
[memory_mallopt_WRAPPER_EXTRA_LIBS="$memory_mallopt_LIBS"])
AS_IF([test "$memory_mallopt_happy" = "no" -a \
"$memory_malloc_hoooks_should_use" = "1"],
[AC_MSG_ERROR([mallopt memory management requested but not available. Aborting.])])
AC_SUBST(memory_mallopt_LIBS)
AS_IF([test "$memory_mallopt_happy" = "yes"],
[memory_base_found=1
$1], [$2])
])

Просмотреть файл

@ -1,23 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 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$
#
# Specific to this module
PARAM_CONFIG_PRIORITY=0
PARAM_CONFIG_FILES="Makefile"

Просмотреть файл

@ -1,114 +0,0 @@
/*
* 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 <sys/types.h>
#include <stdlib.h>
#include <sys/mman.h>
#if defined(HAVE___MUNMAP)
/* here so we only include others if we absolutely have to */
#elif defined(HAVE_SYSCALL)
#include <syscall.h>
#include <unistd.h>
#endif
#if defined(HAVE_DLSYM)
#ifndef __USE_GNU
#define __USE_GNU
#endif
#include <dlfcn.h>
#endif
#include "opal/mca/memory/memory.h"
#include "opal/memoryhooks/memory_internal.h"
#include "opal/constants.h"
#if defined(HAVE___MUNMAP)
int __munmap(void* addr, size_t len);
#endif
static int opal_memory_malloc_open(void);
const opal_memory_base_component_2_0_0_t mca_memory_mallopt_component = {
/* First, the mca_component_t struct containing meta information
about the component itself */
{
OPAL_MEMORY_BASE_VERSION_2_0_0,
/* Component name and version */
"mallopt",
OPAL_MAJOR_VERSION,
OPAL_MINOR_VERSION,
OPAL_RELEASE_VERSION,
/* Component open and close functions */
opal_memory_malloc_open,
NULL
},
{
/* The component is checkpoint ready */
MCA_BASE_METADATA_PARAM_CHECKPOINT
},
};
static int
opal_memory_malloc_open(void)
{
/* This component is a bit weird, in that it exists only to
capture munmap. Real work happens in mpool_base */
opal_mem_hooks_set_support(OPAL_MEMORY_MUNMAP_SUPPORT);
return OPAL_SUCCESS;
}
/* three ways to call munmap. Prefered is to call __munmap, which
will exist if munmap is a weak symbol. If that doesn't work, try
the syscal, and if that doesn't work, try looking in the dynamic
libc. */
int
munmap(void* addr, size_t len)
{
#if !defined(HAVE___MUNMAP) && \
!(defined(HAVE_SYSCALL) && defined(__NR_munmap)) && defined(HAVE_DLSYM)
static int (*realmunmap)(void*, size_t);
#endif
opal_mem_hooks_release_hook(addr, len, 0);
#if defined(HAVE___MUNMAP)
return __munmap(addr, len);
#elif defined(HAVE_SYSCALL) && defined(__NR_munmap)
return syscall(__NR_munmap, addr, len);
#elif defined(HAVE_DLSYM) && defined(HAVE_RTLD_NEXT)
if (NULL == realmunmap) {
union {
int (*munmap_fp)(void*, size_t);
void *munmap_p;
} tmp;
tmp.munmap_p = dlsym(RTLD_NEXT, "munmap");
realmunmap = tmp.munmap_fp;
}
return realmunmap(addr, len);
#else
#error "Can not determine how to call munmap"
#endif
}