[Mono-devel-list] Re: [Bug 71001][Nor] Changed - xsp.exe virtual size grows without bound -- large messages

Ben Maurer bmaurer at ximian.com
Mon Jan 31 20:38:42 EST 2005


On Mon, 2005-01-31 at 17:16 -0800, jrodman at mono-list.spamportal.net
wrote:
> On Mon, Jan 31, 2005 at 08:14:27PM -0500, Ben Maurer wrote:
> > A simpler test case is:
> > 
> > using System.Xml;
> > 
> > class X {
> > 	static void Main ()
> > 	{
> > 		while (true) {
> > 			byte [] b = new byte [1024*1024*50];
> > 			XmlDocument d = new XmlDocument ();
> > 			d.Load ("test.rdf");
> > 		}
> > 	}
> > }
> > 
> > The Xml document here is a huge XML document. It ensures that data of
> > various sizes gets put on the stack. When I run this test case, the heap
> > size grows without bound (it takes a bit longer than your test case),
> > but the number of live bytes says about constant. This means that there
> > is heap fragmentation here.
> 
> Does the RSS of the program stay constant?  In my test case on the
> versions of mono I have (1.0.x based) it becomes unreasonably (hundreds
> of megabytes) large before it stabalizes.

It doesn't stabilize. Try running it for a long time.

BTW, 1.0.x based releases are going to be even worse than 1.1.x. I made
some patches in 1.1.x that make the GC much less conservative on
the .data and .bss sections of unmanaged code.

On 1.1.x you might find that it is not an issue unless you use *REALLY*
large documents. 1 mb might work fine on 1.1.

-- Ben




More information about the Mono-devel-list mailing list