Replies: 1 comment
-
It's relatively easy to extend ArrayPoolMemoryAllocator, just needs a new constructor. I'm fine reviewing a PR dealing with this. Please note that ArrayPoolMemoryAllocator actually uses 2 array pools with different configurations: one for small, one for large buffers. For MemoryPool we need a new MemoryAllocator type, so it's more complicated, needs analysis + design work + discussions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
System.Buffers
namespace contains theArrayPool<T>
andMemoryPool<T>
types which are effectively the standard library allocator types. Many custom allocators are derived from these 2 types. Currently, theImageSharp
allocators don't seem to have a way get one based off one of these types. We haveArrayPoolMemoryAllocator
, which is great, but it doesn't seem to offer a way to create this from a customArrayPool<T>
, which can be frustratingBeta Was this translation helpful? Give feedback.
All reactions