Please enable JavaScript in your browser!
Accueil
Explorer
Aide
Connexion
Matt
/
compilersnotes
Suivre
1
Voter
0
Fork
0
Code
Tickets
0
Pull Requests
0
Commits
1
Publications
0
Wiki
Aucune description
Aborescence:
4f76cd056e
Branches
Tags
master
compilersnotes
/
manmem.md
manmem.md
1.4KB
Historique
Raw
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)