1+ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
12/*
23 * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
34 * University Research and Technology
1112 * All rights reserved.
1213 * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
1314 * 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.
1617 * $COPYRIGHT$
1718 *
1819 * Additional copyrights may follow
3132#include "opal/mca/mpool/mpool.h"
3233
3334#include "opal/mca/allocator/allocator.h"
34- #include " memkind.h"
35+ #include < memkind.h>
3536
3637BEGIN_C_DECLS
3738
38- struct mca_mpool_base_resources_t {
39- char * pool_name ;
40- void * reg_data ;
41- size_t size ;
42- };
4339static const int mca_mpool_memkind_default_pagesize = 4096 ;
4440
45-
46- typedef struct mca_mpool_base_resources_t mca_mpool_base_resources_t ;
47-
4841struct mca_mpool_memkind_module_t {
4942 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 ;
5245};
5346typedef struct mca_mpool_memkind_module_t mca_mpool_memkind_module_t ;
5447
@@ -57,10 +50,11 @@ struct mca_mpool_memkind_component_t {
5750 int hbw ;
5851 int pagesize ;
5952 int bind ;
60- memkind_t kind ;
61- char * memkind_name ;
53+ int default_partition ;
54+ int priority ;
6255 char * memkind_file ;
63- int verbose ;
56+ int output ;
57+ mca_mpool_memkind_module_t modules [MEMKIND_NUM_BASE_KIND ];
6458};
6559typedef struct mca_mpool_memkind_component_t mca_mpool_memkind_component_t ;
6660OPAL_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
6963 * Initializes the mpool module.
7064*/
7165
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 );
7367
7468/**
7569 * Allocate block of high bandwidth memory.
@@ -78,25 +72,22 @@ void* mca_mpool_memkind_alloc(
7872 mca_mpool_base_module_t * mpool ,
7973 size_t size ,
8074 size_t align ,
81- uint32_t flags ,
82- mca_mpool_base_registration_t * * registration );
75+ uint32_t flags );
8376
8477/**
8578 * realloc function typedef
8679 */
8780void * mca_mpool_memkind_realloc (
8881 mca_mpool_base_module_t * mpool ,
8982 void * addr ,
90- size_t size ,
91- mca_mpool_base_registration_t * * registration );
83+ size_t size );
9284
9385/**
9486 * free function typedef
9587 */
9688void mca_mpool_memkind_free (
9789 mca_mpool_base_module_t * mpool ,
98- void * addr ,
99- mca_mpool_base_registration_t * registration );
90+ void * addr );
10091
10192END_C_DECLS
10293
0 commit comments