Title: A Planned Outline for the Abstract Machine for the Message Passing Language’s Memory Management System
Abstract: CaMPL is a functional programming language designed by Cockett and Pastro which uses message-passing semantics for concurrency. In order to run a CaMPL program, the code is first compiled down into code for MPL, which is run by an interpreter. In this talk, I will discuss the design decisions I plan to take when implementing said interpreter in C.
When implementing a programming language, memory management is very important. The way a system stores, allocates, and garbage collects data has a high impact on its performance. Furthermore, there’s no ‘one size fits all’ solution. Every language has unqiue propeties which lend themselves to different backend memory mangement systems.
There are two aspects of CaMPL in particular that are relevant to the system I am implementing:
-functional sequntial semantics
-message passing semantics on the concurrent side
These traits are shared by the programming language Erlang, and many of my solutions will be adapted from those used by that programming language.
I will start by discussing the overall memory architecture of the system, which uses private heaps for individual processes and a shared global heap for messages. Then I’ll talk about the implications for garbage collection that this scheme has, and outline the local and global heap garbage collection algorithms. Next, I’ll discuss how memory allocation will work on both sides, and I’ll conclude by discussing the algorithms I plan to use to reduce memory fragmentation.