Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msg/async/rdma: fixup memory free #12236

Merged
merged 1 commit into from Nov 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/msg/async/rdma/Infiniband.h
Expand Up @@ -260,17 +260,17 @@ class Infiniband {
++c;
}
if (manager.enabled_huge_page)
delete base;
else
manager.free_huge_pages(base);
else
delete base;
}
int add(uint32_t num) {
uint32_t bytes = chunk_size * num;
//cihar* base = (char*)malloc(bytes);
if (!manager.enabled_huge_page) {
base = (char*)memalign(CEPH_PAGE_SIZE, bytes);
} else {
if (manager.enabled_huge_page) {
base = (char*)manager.malloc_huge_pages(bytes);
} else {
base = (char*)memalign(CEPH_PAGE_SIZE, bytes);
}
assert(base);
for (uint32_t offset = 0; offset < bytes; offset += chunk_size){
Expand Down