Memory, What Is It All About?
It is literally impossible to program without having some understanding of memory. However, the subject is rarely explained in and out from the machine to the language, with the compiler in between. This talk is going to discuss how these parts of the stack work with memory and how they interact with conventional automatic memory management's methods.
This talk is going to do a deep dive in memory. This includes:
- Cache hierarchy of modern CPUs
- Cache consistency of modern CPUs
- How D's type qualifiers take advantage of modern CPU's memory mechanisms
- Compiler and runtime aspects of reference counting (including exception handling)
- Compiler and runtime aspects of garbage collections. Strategies that can and cannot be used in D
- Sharing memory across cores via immutable and shared. Implications for the compiler and the CPU
- Pitfalls and holes in current D's implementations. Which are bugs, and which are features.
- Quick overview of alternatives (via linear types, via convention à la C++, agents à la Erlang, ...), discuss pro and cons.
Amaury Sechet is a software engineer at Facebook and the main developer of SDC.