5

A few weeks ago I read something about a new class in .Net 4/4.5 that performs better than MemoryStream, but I can't seem to find it anymore.

I've looked in the IO namespace and could not find anything. Does anyone remember reading something like that?

Thanks

Ryan Gates
  • 4,442
  • 5
  • 49
  • 87
MeTitus
  • 3,311
  • 1
  • 23
  • 47
  • 1
    I was actually talking about Memory-Mapped Files: http://msdn.microsoft.com/en-us/library/dd997372.aspx – MeTitus Mar 29 '13 at 20:07
  • Hard for anyone to guess that :-) Memory mapped files have been around for a long time. They're just conveniently wrapped by the .NET runtime in .NET 4. – Eric J. Mar 29 '13 at 21:46

2 Answers2

10

Perhaps you read about Memory Tributary, a CodePlex project that provides a MemoryStream replacement better suited for large amounts of memory

MemoryTributary is a MemoryStream replacement using multiple memory segments to store the content of the stream, as opposed to the single byte array of MemoryStream. It is designed to be a complete replacement, capable of handling the large datasets that MemoryStream cannot.

http://memorytributary.codeplex.com/

Eric J.
  • 143,945
  • 62
  • 324
  • 540
  • Yes I found that one too, but I think it was something else, let me see what other people say. Thanks – MeTitus Oct 03 '12 at 18:30
  • I went over the framework changes for 4 and 4.5 pretty carefully and don't recall anything like that. Still, would be pleasantly surprised if someone else found something new. – Eric J. Oct 03 '12 at 19:02
  • OK fair enough, it seems that I must have confused that with something else. Thanks :) – MeTitus Oct 04 '12 at 13:03
2

Not the answer that OP was looking for, but it may be usefull for someone like me who searches for MemoryStream replacement: RecyclableMemoryStream released by Bing team, which is actually better performing MemoryStream drop-in replacement.

ghord
  • 12,327
  • 6
  • 39
  • 66