Skip to content

Implement arena_extent_dalloc in pool_jemalloc #141

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

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/pool/pool_jemalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,17 @@ static bool arena_extent_dalloc(extent_hooks_t *extent_hooks, void *addr,
size_t size, bool committed,
unsigned arena_ind) {
(void)extent_hooks; // unused
(void)addr; // unused
(void)size; // unused
(void)committed; // unused
(void)arena_ind; // unused

return true; // true means failure (unsupported)
jemalloc_memory_pool_t *pool = get_pool_by_arena_index(arena_ind);

umf_result_t ret;
ret = umfMemoryProviderFree(pool->provider, addr, size);
if (ret != UMF_RESULT_SUCCESS) {
fprintf(stderr, "umfMemoryProviderFree failed in dalloc \n");
}

return ret != UMF_RESULT_SUCCESS;
}

// arena_extent_commit - an extent commit function conforms to the extent_commit_t type and commits
Expand Down