Skip to content

Conversation

@X-czh
Copy link

@X-czh X-czh commented Dec 29, 2025

What changes were proposed in this pull request?

Creating a new BaseAllocator internally if not supplied for the constructor of MemoryPoolAllocator with user supplied buffer.

Why are the changes needed?

Currently, user has to supply a constructor for BaseAllocator (default to 0) when calling the constructor of MemoryPoolAllocator with user supplied buffer. As a result, the default parameter of chunk size does not take effect as well, as one has to supply supply a constructor for BaseAllocator anyway.
We can improve user experience by creating a new BaseAllocator internally if not supplied, the same approach adopted by the constructor without user supplied buffer.

…uffer by creating new BaseAllocator internally on default
@X-czh X-czh changed the title chore: simplify constructing MemoryPoolAllocator with user supplied buffer by creating new BaseAllocator internally on default chore: simplify construction of MemoryPoolAllocator with user supplied buffer by creating new BaseAllocator internally on default Dec 29, 2025
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.

1 participant