Нет описания

manmem.md 1.4KB

Summarise Contribution & Motivation

  • There are lots of safe programming languages
  • People don't use them
  • Garbage collection is the source of inefficiency in unsafe languages
  • Safe manual memory management is a potential solution to this.
  • Simply add a delete operator to free memory, and an exception if that memory is then dereferenced

Methodology

  • Programming model changes
  • Replace GC heap with manually managed heap allocated from new keyword
  • New delete operator
  • Guarantee memory safety with new exception
  • Does not impact on the compiler or programmer too much, no restriction on aliasing
  • Delete semantics are intentionally weak for performance reasons, but maintain safety from use-after-free bugs
  • Uses 64 bit hardware to assign each object new virtual addresses without reusing one until safe to do so
  • The processors MMU will then detect violations as objects are unmapped from the applications address space
  • Other operations allocate objects on new virtual pages as virtual operations are only allowed on pages
  • Included an allocator in .NET toolchain

Critical Assessment

  • Good solution that builds on other works shortcomings
  • Still places burden on programmer unlikely to make changes
  • Using hardware to detect violations is good idea to keep overhead low
  • Somewhat non-deterministic, but this doesn't matter as the original program also was and they address this(extensive testing + debug option)