Nasal GC Musings: Difference between revisions

Jump to navigation Jump to search
m
Line 1: Line 1:
{{Main article|How the Nasal GC works}}
{{Main article|How the Nasal GC works}}
{{Stub}}
{{Stub}}
The focus of the following article is to promote a better understanding of garbage collection in general, specifically mark/sweep collectors and how a generational garbage collector (GC) could be implemented in FlightGear by adapting the existing mark/sweep collector.
The goal is not to create a new GC implementation from scratch, but rather to understand and improve upon the existing GC scheme to make it more efficient.
The idea is that implementing a generational GC, which is a type of GC that separates objects into different generations based on how long they have been in memory, could improve the performance of the GC in Nasal/FlightGear.
The following article also suggests that generalizing the interface of the existing GC would make it easier to experiment with other GCs, such as the Boehm/Weiser GC or sgen. Given that some GC implementations are only available in C++, it might make sense to port Nasal to compile as C++ code (which would have other benefits too).
Some examples of freely available garbage collectors (GCs) that could be used in a C or C++ project include:
* Boehm GC: This is a conservative GC that is designed to work with a wide range of programming languages and environments. It is capable of garbage collecting C and C++ programs, and is available under the Apache License 2.0.
* sgen: This is a GC that is specifically designed for use with the Mono runtime, which is an open-source implementation of the .NET framework. It is available under the MIT License.
* libgc: This is a GC that is designed to be used as a library, and can be integrated into C and C++ programs. It is available under the BSD 3-Clause License.
== Background ==
== Background ==
FlightGear is an open-source flight simulator that includes built-in scripting support using the Nasal programming language. Nasal is a dynamic language that uses automatic memory management, which means that it manages the allocation and deallocation of memory automatically. Over the last two decades, Nasal has become an essential part of FlightGear, and its use has grown significantly, with many subsystems and features depending on Nasal scripts to function properly.
FlightGear is an open-source flight simulator that includes built-in scripting support using the Nasal programming language. Nasal is a dynamic language that uses automatic memory management, which means that it manages the allocation and deallocation of memory automatically. Over the last two decades, Nasal has become an essential part of FlightGear, and its use has grown significantly, with many subsystems and features depending on Nasal scripts to function properly.

Navigation menu