You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 1, 2024. It is now read-only.
In MultiBufferMemoryStream ctor, the IBufferManager.GetDefaultBufferSize() method is called and the result is stored in the bufferSize field of the stream. In MultiBufferMemoryStream .AddBlock it's asserted that a buffer returned from the bufferManager has this exact same size (bufferSize).
In the documentation of IBufferManager.TakeBuffer it's indicated that the returned buffer can of be the requested size or larger. This is also the behavior that (IMHO) is the easiest to achieve in a buffer manager implementation (for instance using System.Buffers).
I would suggest changing the code to allow larger buffers from TakeBuffer. And improve the documentation of the IBufferManager class. Right now the documentation in GetDefaultBufferSize and TakeBuffer is conflicting wrt the expected output buffer sizes.