diff --git a/prov/util/src/util_buf.c b/prov/util/src/util_buf.c index 2d468f84805..d2f116f918f 100644 --- a/prov/util/src/util_buf.c +++ b/prov/util/src/util_buf.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2016 Intel Corporation. All rights reserved. - * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * Copyright (c) 2018-2019 Amazon.com, Inc. or its affiliates. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -161,7 +161,10 @@ int util_buf_grow(struct util_buf_pool *pool) if (pool->attr.free_hndlr) pool->attr.free_hndlr(pool->attr.ctx, buf_region->context); err2: - ofi_freealign(buf_region->mem_region); + if (pool->attr.is_mmap_region) + ofi_free_hugepage_buf(buf_region->mem_region, buf_region->size); + else + ofi_freealign(buf_region->mem_region); err1: free(buf_region); return -1; diff --git a/prov/util/src/util_mr_map.c b/prov/util/src/util_mr_map.c index 7ac450c16d3..d25f031c0fc 100644 --- a/prov/util/src/util_mr_map.c +++ b/prov/util/src/util_mr_map.c @@ -208,8 +208,9 @@ int ofi_mr_close(struct fid *fid) static struct fi_ops ofi_mr_fi_ops = { .size = sizeof(struct fi_ops), .close = ofi_mr_close, + .bind = fi_no_bind, .control = fi_no_control, - .ops_open = fi_no_ops_open, + .ops_open = fi_no_ops_open }; int ofi_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr,