Memory management techniques for dynamic languages
Loading...
Date
2024-08
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
University of New Brunswick
Abstract
Garbage collection as a field requires well-documented and reusable techniques as well as considerations for the design abstractions of programming languages. This dissertation focuses on dynamically-typed languages, whose design warrants specific studies and optimizations. The first theme of the dissertation is the use of the Eclipse OMR framework for the correct, portable, and language-independent implementation of high performing garbage collectors for the RPython Meta-tracing-JIT-based dynamic languages.
We extend the use of the framework-based garbage collectors to study the garbage collection cost for the same dynamic languages, highlighting the trade-off in performance between JIT tracing and garbage collection and thereby proposing a novel optimal JIT trace sizing solution.
We further address two problems related to the collection resizing and boxing overhead for dynamic languages. We propose a calling context aware collection presizing technique for the former and present type-based stores, a novel memory layout to optimize type polymorphism in collection data structures for the latter.
Dynamic languages often also provide foreign function interfaces; the Python language has a C API but challenges of pointer stability, lifetime complexity and memory model compatibility continue to receive little attention in the research community. We propose a garbage collection friendly Python FFI, we call CyStck, that combines a stack and light-weight handles along with migration tooling for extensions.