How does Ruby manage memory? | Saeloun Blog

Each programming language has its version of memory management so, let us look into how Ruby does this under the hood.For Dynamic Memory allocation, the Ruby program uses Heap memory and the basic unit of the heap is a slot. Here, each slot occupies a value which is known as RVALUE. This RVALUE comprises 40 bytes and a container for objects of all types (Array, String, Class). Out of these 40 bytes, the initial 8 bytes are reserved for a flag, followed by 8 bytes of Klass pointer. The remaining 24 bytes are reserved for object-specific fields.
How does Ruby manage memory? | Saeloun Blog #ruby #rubydeveloper #rubyonrails #blog https://rubyonrails.ba/single/how-does-ruby-manage-memory-saeloun-blog

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles