OpenMPI  0.1.1
memory_linux.h
1 /*
2  * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
3  * $COPYRIGHT$
4  *
5  * Additional copyrights may follow
6  *
7  * $HEADER$
8  */
9 
10 #ifndef OPAL_MEMORY_LINUX_H
11 #define OPAL_MEMORY_LINUX_H
12 
13 #include "opal_config.h"
14 
15 #include "opal/mca/memory/memory.h"
16 
17 BEGIN_C_DECLS
18 
19 /* Component structure */
20 
23 
24  /* Component data */
25  int verbose_level;
26  int enable_ummunotify;
27  int enable_ptmalloc2;
28 
29 #if MEMORY_LINUX_UMMUNOTIFY
30  /* Ummunotify-specific data */
31  int ummunotify_fd;
32 #endif
33 
34 #if MEMORY_LINUX_PTMALLOC2
35  /* Ptmalloc2-specific data */
36  bool free_invoked;
37  bool malloc_invoked;
38  bool realloc_invoked;
39  bool memalign_invoked;
40  bool munmap_invoked;
41 #endif
43 
44 /* memory_linux_component.c */
45 
46 extern opal_memory_linux_component_t mca_memory_linux_component;
47 
48 
49 #if MEMORY_LINUX_UMMUNOTIFY
50 /* memory_linux_ummunotify.c */
51 int opal_memory_linux_ummunotify_open(void);
52 int opal_memory_linux_ummunotify_close(void);
53 #endif /* MEMORY_LINUX_UMMUNOTIFY */
54 
55 #if MEMORY_LINUX_PTMALLOC2
56 /* memory_linux_ptmalloc2.c */
57 int opal_memory_linux_ptmalloc2_open(void);
58 int opal_memory_linux_ptmalloc2_close(void);
59 
60 /* memory_linux_munmap.c */
61 OPAL_DECLSPEC int opal_memory_linux_free_ptmalloc2_munmap(void *start, size_t length, int from_alloc);
62 OPAL_DECLSPEC int munmap(void* addr, size_t len);
63 #endif /* !MEMORY_LINUX_PTMALLOC2 */
64 
65 END_C_DECLS
66 
67 #endif
Structure for memory components.
Definition: memory.h:114
Definition: memory_linux.h:21