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

[POC] add free handler to the proxy lib #978

Draft
wants to merge 1 commit into
base: v0.10.x
Choose a base branch
from

Conversation

bratpiorka
Copy link
Contributor

@bratpiorka bratpiorka commented Dec 7, 2024

[POC] Add free handler to the proxy lib

This PR:

  • adds new API call umfSetProxyLibHandlerFreePre to the Proxy Lib which set the user's callback called before the Proxy Lib calls free()
  • moves proxy_lib.h to the public API so it is now installed with other headers
  • moves Proxy Lib tests to separate test folder
  • adds simple test for umfSetProxyLibHandlerFreePre

NOTE: the baseline is v0.10.x as it contains IPC handler

TODO:

  • Documentation
  • Other handlers

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly
  • New tests added, especially if they will fail without my changes
  • Extended the README/documentation
  • All newly added source files have a license
  • All newly added source files are referenced in CMake files
  • Logger (with debug/info/... messages) is used

@bratpiorka bratpiorka force-pushed the rrudnick_proxy_handlers branch 3 times, most recently from 6ea5b2f to 2165f92 Compare December 9, 2024 08:42
@bratpiorka bratpiorka changed the base branch from main to v0.10.x December 9, 2024 08:44
@bratpiorka bratpiorka force-pushed the rrudnick_proxy_handlers branch from 2165f92 to 2c03c43 Compare December 9, 2024 08:55
typedef void (*umf_proxy_lib_handler_free_pre_t)(void *ptr,
umf_memory_pool_handle_t pool);

void umfSetProxyLibHandlerFreePre(umf_proxy_lib_handler_free_pre_t handler);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to discuss the following question at the UMF technical meeting: Should this API be part of the proxy library or the core UMF library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants