Skip to content

Commit cdf46e6

Browse files
authored
Merge pull request #7222 from jsquyres/pr/mpool-basic-pointer-fix
mpool/base: fix basic mpool_base() function
2 parents 37f5079 + 53ebea1 commit cdf46e6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

opal/mca/mpool/base/mpool_base_basic.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,15 @@ static void mca_mpool_base_basic_finalize (struct mca_mpool_base_module_t *mpool
8181
free (mpool);
8282
}
8383

84+
static void *mca_mpool_base_basic_base(mca_mpool_base_module_t *mpool)
85+
{
86+
mca_mpool_base_basic_module_t *basic_module = (mca_mpool_base_basic_module_t *) mpool;
87+
88+
return (void*) basic_module->ptr;
89+
}
90+
8491
static mca_mpool_base_module_t mca_mpool_basic_template = {
92+
.mpool_base = mca_mpool_base_basic_base,
8593
.mpool_alloc = mca_mpool_base_basic_alloc,
8694
.mpool_free = mca_mpool_base_basic_free,
8795
.mpool_finalize = mca_mpool_base_basic_finalize,
@@ -100,7 +108,6 @@ mca_mpool_base_module_t *mca_mpool_basic_create (void *base, size_t size, unsign
100108

101109
OBJ_CONSTRUCT(&basic_module->lock, opal_mutex_t);
102110

103-
basic_module->super.mpool_base = base;
104111
basic_module->ptr = (uintptr_t) base;
105112
basic_module->size = basic_module->avail = size;
106113
basic_module->min_align = min_align;

0 commit comments

Comments
 (0)