Skip to content

Fix return values from jemalloc hooks #117

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 10, 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
10 changes: 7 additions & 3 deletions src/pool/pool_jemalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ static bool arena_extent_commit(extent_hooks_t *extent_hooks, void *addr,
(void)length; // unused
(void)arena_ind; // unused

return true; // true means failure (unsupported)
// TODO: add this function to the provider API to support Windows and USM
return false; // false means success (commit is a nop)
}

// arena_extent_decommit - an extent decommit function conforms to the extent_decommit_t type
Expand All @@ -156,6 +157,7 @@ static bool arena_extent_decommit(extent_hooks_t *extent_hooks, void *addr,
(void)length; // unused
(void)arena_ind; // unused

// TODO: add this function to the provider API to support Windows and USM
return true; // true means failure (unsupported)
}

Expand Down Expand Up @@ -215,7 +217,8 @@ static bool arena_extent_split(extent_hooks_t *extent_hooks, void *addr,
(void)committed; // unused
(void)arena_ind; // unused

return true; // true means failure (unsupported)
// TODO: add this function to the provider API to support Windows and USM
return false; // false means success (split is a nop)
}

// arena_extent_merge - an extent merge function conforms to the extent_merge_t type and optionally
Expand All @@ -235,7 +238,8 @@ static bool arena_extent_merge(extent_hooks_t *extent_hooks, void *addr_a,
(void)committed; // unused
(void)arena_ind; // unused

return true; // true means failure (unsupported)
// TODO: add this function to the provider API to support Windows and USM
return false; // false means success (merge is a nop)
}

// The extent_hooks_t structure comprises function pointers which are described individually below.
Expand Down