[Gc] volatile for GC_clear_stack

Boehm, Hans hans.boehm at hp.com
Wed Dec 3 17:55:41 PST 2008

Are there compilers for which this helps?  I would expect that it's unlikely that a compiler would remove the array.  But if it were going to, I'd expect it to still do so so long as the actually accesses are not volatile.

Unless this is known to help, I think I would rather keep the code as it is.  If the array does get eliminated, we have a space performance, but not correctness, issue.


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Ivan Maidanski
> Sent: Friday, November 21, 2008 4:28 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] volatile for GC_clear_stack
> Hi!
> This small patch adds "volatile" qualifier for "dummy" arrays
> (together with de-volatile casts) in GC_clear_stack[_inner]().
> Bye.

More information about the Gc mailing list