Replies: 4 comments 6 replies
-
Maybe increase the stack size dynamically as needed, is to prevent stack overflow |
Beta Was this translation helpful? Give feedback.
-
For object serialization there are other ways than using MemoryStream, like using Besides that it's not to difficult to write a Stream backed by stackallocated buffer. |
Beta Was this translation helpful? Give feedback.
-
https://dotnet.github.io/dotNext/api/DotNext.Buffers.BufferWriterSlim-1.html Maybe its useful here. |
Beta Was this translation helpful? Give feedback.
-
... in what context do you need non-allocating serialization? |
Beta Was this translation helpful? Give feedback.
-
Although it can expand to overflow the stack, it gives 99% of object serialization an option to be allocation free simply writing the serialized result to stack allocated Span
Beta Was this translation helpful? Give feedback.
All reactions