When you request buffer of size N from System.Buffers.MemoryPool<T> returns IMemoryOwner<T> which can hold Memory<T> at least N elements. That proves to be a problem in some scenarios like passing serialized data back to your users. You need to pass them one more field: actual length of data. This pool will always trim IMemory<T> to requested length. It will also provide a property with an access to underlying buffer.
-
Notifications
You must be signed in to change notification settings - Fork 1
Fixed length buffers from MemoryPool.
License
progaudi/progaudi.buffers
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
Fixed length buffers from MemoryPool.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published