menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Technology News

>

Inside the...
source image

Medium

2w

read

148

img
dot

Image Credit: Medium

Inside the Erlang Garbage Collector: A Functional Perspective on Concurrency and Memory Management

  • Erlang's garbage collector (GC) is based on Cheney's algorithm, which pioneered the idea of semispace copying collection and avoids recursion and fragmentation.
  • In Erlang, each lightweight process runs on the BEAM VM and is fully isolated with no shared memory, allowing the GC to only affect the process whose heap is full and avoiding global pauses.
  • Copying is safe and predictable in Erlang as it uses immutability, and during the process, a forwarding pointer is left behind to avoid multiple copies of the same object and ensure proper reference updates.
  • Erlang's GC is generational and promotes objects that survive multiple GCs to the old generation, reducing allocation pressure and collection frequency for stable processes.

Read Full Article

like

8 Likes

For uninterrupted reading, download the app