POV-Ray : Newsgroups : povray.off-topic : Interesting GC performance test : Interesting GC performance test Server Time
6 Sep 2024 07:14:23 EDT (-0400)
  Interesting GC performance test  
From: Darren New
Date: 31 Jan 2009 17:48:43
Message: <4984d54b$1@news.povray.org>
Before running: 6.8 meg of unshared memory used.
While running: 7.1 meg of unshared memory used.

Doesn't look like GC tends to expand indefinitely, even when you *do* have 
tons of memory available. If you use allocations bigger than about 80K, it 
works even better, because .NET tracks them separately in a separate 
generation.

(Patched into a larger program just to test it out, so it's not 6 meg for 
this simple bit of code.)

         private void button6_Click(object sender, EventArgs e)
         {
             byte[] outer; byte[] outer2;
             for (int i = 0; i < 1024 * 1024 * 200; i++)
             {
                 outer = new byte[8192];
                 byte[] inner1 = new byte[8192];
                 byte[] inner2 = new byte[50190];
                 for (int j = 0; j < 1024; j++)
                 {
                     outer2 = new byte[30000];
                 }
             }
         }


-- 
   Darren New, San Diego CA, USA (PST)
   "Ouch ouch ouch!"
   "What's wrong? Noodles too hot?"
   "No, I have Chopstick Tunnel Syndrome."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.