POV-Ray : Newsgroups : povray.off-topic : Interesting GC performance test : Re: Interesting GC performance test Server Time
6 Sep 2024 07:17:51 EDT (-0400)
  Re: Interesting GC performance test  
From: Darren New
Date: 31 Jan 2009 20:15:46
Message: <4984f7c2@news.povray.org>
Warp wrote:
>   Are you sure the compiler is not performing some clever optimization
> tricks there like: "Hmm, this code allocates a piece of memory to this
> pointer, the pointer demonstrably is not passed to anything anywhere
> but is re-assigned a new memory block, thus the allocated memory is
> likewise freed at that point, so I'll put a GC flag to this block of
> memory to tell the GC engine that it's free."

I'm not sure that's the case. I'm almost certain that it doesn't reuse 
memory in the middle of the block that's already been freed.

>   I wonder if it makes any difference if the pointer is passed to some
> function which the compiler doesn't know what it does at this point.

I'll give that a go and let you know.  I'll try to make it more convoluted.

-- 
   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.