This source file includes following definitions.
- _basic_open
- mca_memheap_buddy_component_query
- mca_memheap_buddy_component_close
1
2
3
4
5
6
7
8
9
10
11
12
13 #include "oshmem_config.h"
14 #include "opal/util/output.h"
15 #include "oshmem/mca/memheap/memheap.h"
16 #include "oshmem/mca/memheap/base/base.h"
17 #include "oshmem/mca/memheap/buddy/memheap_buddy.h"
18 #include "memheap_buddy_component.h"
19
20 static int mca_memheap_buddy_component_close(void);
21 static int mca_memheap_buddy_component_query(mca_base_module_t **module, int *priority);
22
23 static int _basic_open(void);
24
25 mca_memheap_base_component_t mca_memheap_buddy_component = {
26 .memheap_version = {
27 MCA_MEMHEAP_BASE_VERSION_2_0_0,
28
29 .mca_component_name = "buddy",
30 MCA_BASE_MAKE_VERSION(component, OSHMEM_MAJOR_VERSION, OSHMEM_MINOR_VERSION,
31 OSHMEM_RELEASE_VERSION),
32
33 .mca_open_component = _basic_open,
34 .mca_close_component = mca_memheap_buddy_component_close,
35 .mca_query_component = mca_memheap_buddy_component_query,
36 },
37 .memheap_data = {
38
39 MCA_BASE_METADATA_PARAM_CHECKPOINT
40 },
41 .memheap_init = mca_memheap_buddy_module_init
42 };
43
44
45 static int _basic_open(void)
46 {
47 return OSHMEM_SUCCESS;
48 }
49
50
51 static int
52 mca_memheap_buddy_component_query(mca_base_module_t **module, int *priority)
53 {
54 *priority = memheap_buddy.priority;
55 *module = (mca_base_module_t *)&memheap_buddy.super;
56 return OSHMEM_SUCCESS;
57 }
58
59
60
61
62
63 int mca_memheap_buddy_component_close()
64 {
65 mca_memheap_buddy_finalize();
66 return OSHMEM_SUCCESS;
67 }