1
+ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
1
2
/*
2
3
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
3
4
* University Research and Technology
11
12
* All rights reserved.
12
13
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
13
14
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
14
- * Copyright (c) 2010-2012 Los Alamos National Security, LLC.
15
- * All rights reserved.
15
+ * Copyright (c) 2010-2015 Los Alamos National Security, LLC. All rights
16
+ * reserved.
16
17
* $COPYRIGHT$
17
18
*
18
19
* Additional copyrights may follow
31
32
#include "opal/mca/mpool/mpool.h"
32
33
33
34
#include "opal/mca/allocator/allocator.h"
34
- #include " memkind.h"
35
+ #include < memkind.h>
35
36
36
37
BEGIN_C_DECLS
37
38
38
- struct mca_mpool_base_resources_t {
39
- char * pool_name ;
40
- void * reg_data ;
41
- size_t size ;
42
- };
43
39
static const int mca_mpool_memkind_default_pagesize = 4096 ;
44
40
45
-
46
- typedef struct mca_mpool_base_resources_t mca_mpool_base_resources_t ;
47
-
48
41
struct mca_mpool_memkind_module_t {
49
42
mca_mpool_base_module_t super ;
50
- size_t alloc_size ;
51
- struct mca_mpool_base_resources_t resources ;
43
+ memkind_t kind ;
44
+ int page_size ;
52
45
};
53
46
typedef struct mca_mpool_memkind_module_t mca_mpool_memkind_module_t ;
54
47
@@ -57,10 +50,11 @@ struct mca_mpool_memkind_component_t {
57
50
int hbw ;
58
51
int pagesize ;
59
52
int bind ;
60
- memkind_t kind ;
61
- char * memkind_name ;
53
+ int default_partition ;
54
+ int priority ;
62
55
char * memkind_file ;
63
- int verbose ;
56
+ int output ;
57
+ mca_mpool_memkind_module_t modules [MEMKIND_NUM_BASE_KIND ];
64
58
};
65
59
typedef struct mca_mpool_memkind_component_t mca_mpool_memkind_component_t ;
66
60
OPAL_MODULE_DECLSPEC extern mca_mpool_memkind_component_t mca_mpool_memkind_component ;
@@ -69,7 +63,7 @@ OPAL_MODULE_DECLSPEC extern mca_mpool_memkind_component_t mca_mpool_memkind_comp
69
63
* Initializes the mpool module.
70
64
*/
71
65
72
- void mca_mpool_memkind_module_init (mca_mpool_memkind_module_t * mpool );
66
+ void mca_mpool_memkind_module_init (mca_mpool_memkind_module_t * mpool , int partition );
73
67
74
68
/**
75
69
* Allocate block of high bandwidth memory.
@@ -78,25 +72,22 @@ void* mca_mpool_memkind_alloc(
78
72
mca_mpool_base_module_t * mpool ,
79
73
size_t size ,
80
74
size_t align ,
81
- uint32_t flags ,
82
- mca_mpool_base_registration_t * * registration );
75
+ uint32_t flags );
83
76
84
77
/**
85
78
* realloc function typedef
86
79
*/
87
80
void * mca_mpool_memkind_realloc (
88
81
mca_mpool_base_module_t * mpool ,
89
82
void * addr ,
90
- size_t size ,
91
- mca_mpool_base_registration_t * * registration );
83
+ size_t size );
92
84
93
85
/**
94
86
* free function typedef
95
87
*/
96
88
void mca_mpool_memkind_free (
97
89
mca_mpool_base_module_t * mpool ,
98
- void * addr ,
99
- mca_mpool_base_registration_t * registration );
90
+ void * addr );
100
91
101
92
END_C_DECLS
102
93
0 commit comments