Re: How to force gcc to blackhole registers so that things maybe garbage collected?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/17/19 4:04 PM, Andrew Haley wrote:
> Its not the collector’s imprecision that’s the problem here. Boehm
> GC is conservative i.e.  if an integer in the memory looks like a
> pointer to memory then that memory is leaked. The problem here is
> that gcc leaves dead pointers in registers and doesn’t overwrite
> them if there isn’t a lot of register pressure.

I have a suggestion: try writing a function in assembly language that
clears all call-clobbered registers. I reckon this will solve 75% of
your problem.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux