I assume you're looking at the process size when you hit the ReadKey(). Your ObjMemoryStream will be 1GB + 1 byte big (you start from 0). Then you evaluate ObjMemoryStream.ToArray(). That will create an array (Help: "This method returns a copy of the contents of the MemoryStream as a byte array"), also of size 1GB-odd. (You don't know when .NET will garbage-collect that, and process sizes often don't shrink anyway.) Don't convert your memory stream to an array! Try something like ObjMemoryStream.CopyTo() instead.