Compiler Interface to Garbage Collector

Garbage collector needs to know

  • reference roots
  • reference fields

Need to generate information on

  • global variables
  • heap: tag each record with its type information, like class descriptors for dynamic method calls from Lecture 13
  • stack: need stack map that determines for relevant points where references are on stack and registers

Note: sometimes compiler generates pointer arithmetic on references to access fields

  • stack map must indicate those pointers, too, and indicate what their base pointers are