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

Overriding frame memory allocator #487

Closed
EmilioPeJu opened this issue Nov 30, 2022 · 0 comments
Closed

Overriding frame memory allocator #487

EmilioPeJu opened this issue Nov 30, 2022 · 0 comments

Comments

@EmilioPeJu
Copy link
Member

EmilioPeJu commented Nov 30, 2022

Hi all,

I am working on an AD plugin which uses shared memory to pass the frames to an external process with minimal overhead, unfortunately NDArrayPool doesn't provide mechanisms to override the mapping/unmapping of memory:

  • The hook functions don't have enough power to affect the memory management.
  • Creating a NDArrayPool subclass wouldn't work as alloc/release methods are not virtual, and even if they were it would affect only the plugin instantiating it.

The approach I took is providing a function to override function pointers used in place of malloc/free inside NDArrayPool

If this approach is appreciated, see pull request #486, otherwise I'm open to alternative approaches

@EmilioPeJu EmilioPeJu changed the title Overriding frame memory management Overriding frame memory allocator Oct 2, 2023
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

No branches or pull requests

2 participants