1. 08 9月, 2012 1 次提交
    • E
      gc: Add stack walker for new garbage collector. · 3f0d207b
      Elliott Slaughter 提交于
      Safe points are exported in a per-module list via the crate map. A C
      runtime call walks the crate map at startup and aggregates the list of
      safe points for the program.
      
      Currently the GC doesn't actually deallocate memory on malloc and
      free. Adding the GC at this stage is primarily of testing value.
      
      The GC does attempt to clean up exchange heap and stack-allocated
      resource on failure.
      
      A result of this patch is that the user now needs to be careful about
      what code they write in destructors, because the GC and/or failure
      cleanup may need to call destructors. Specifically, calls to malloc
      are considered unsafe and may result in infinite loops or segfaults.
      3f0d207b