-
Notifications
You must be signed in to change notification settings - Fork 35
[POC] add umfDisjointPoolTrimMemory #1318
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,12 @@ umf_result_t | |
umfDisjointPoolParamsSetName(umf_disjoint_pool_params_handle_t hParams, | ||
const char *name); | ||
|
||
/// @brief Tries to release unused pooled memory back to the provider. | ||
/// @param pool handle to the memory pool. | ||
/// @param minSlabsToKeep minimum number of slabs to keep. | ||
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure. | ||
umf_result_t umfDisjointPoolTrimMemory(void *pool, size_t minSlabsToKeep); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How this API is going to be used? And why is it disjoint pool specific? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we are trying to stabilize the API before the 1.0 release, we should review such changes at the UMF tech meeting first. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
const umf_memory_pool_ops_t *umfDisjointPoolOps(void); | ||
|
||
#ifdef __cplusplus | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do it thru ctl?