Does the .NET garbage collector perform predictive analysis of code?

The Garbage Collector relies on information compiled into your assembly provided by the JIT compiler that tells it what code address ranges various variables and “things” are still in use over. As such, in your code, since you no longer use the object variables GC is free to collect them. WeakReference will not prevent this, … Read more

Is a garbage collector (.net/java) an issue for real-time systems?

To be precise, garbage collectors are a problem for real-time systems. To be even more precise, it is possible to write real-time software in languages that have automatic memory management. More details can be found in the Real Time Specification for Java on one of the approaches for achieving real-time behavior using Java. The idea … Read more

Current state of Haskell soft real-time

So the concern for “real time” is the latency introduced by GC collections. GHC uses a multicore garbage collector (and there is a branch with per-thread local heaps). Originally developed to improve multcore performance (each core can collect independently) by reducing the cost of frequent stop-the-world synchronisation, this happens to also benefit soft-real time for … Read more

Python del statement

The del statement doesn’t reclaim memory. It removes a reference, which decrements the reference count on the value. If the count is zero, the memory can be reclaimed. CPython will reclaim the memory immediately, there’s no need to wait for the garbage collector to run. In fact, the garbage collector is only needed for reclaiming … Read more

Garbage collection and memory management in Erlang

To classify things, lets define the memory layout and then talk about how GC works. Memory Layout In Erlang, each thread of execution is called a process. Each process has its own memory and that memory layout consists of three parts: Process Control Block, Stack and Heap. PCB: Process Control Block holds information like process … Read more

tech