Skip to content

Commit 4abeab2

Browse files
committed
Typo
1 parent f7a06e6 commit 4abeab2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,14 @@ I will add more questions in the future using pull requests so feel free to watc
205205
... 57 57 57 57 58 51 58 58 58 58 58 51 58 58 58 58 58 58 51 58 58 58 58 58 51 58 51 51 51 51 51 51 51 51 51 51 ...
206206
```
207207

208-
I read [Watching and Understanding the Ruby 2.1 Garbage Collector at Work](https://thorstenball.com/blog/2014/03/12/watching-understanding-ruby-2.1-garbage-collector/) and [Tracing garbage collection](https://en.wikipedia.org/wiki/Tracing_garbage_collection#Generational_GC_.28ephemeral_GC.29) without finding the answer.
209208
As you can see generation number are in random order. After watching [Methods of Memory Management in MRI by Aaron Patterson](https://youtu.be/gtQmWk8mCRs?t=1185) it's a normal behavior to realocate in other generation.
210209

211210
> In order to classify objects as new or old the GC does the following: whenever it marks an object in a mark-phase (which means that the object will survive this GC run) it promotes it to the old generation. *[Watching and Understanding the Ruby 2.1 Garbage Collector at Work](https://thorstenball.com/blog/2014/03/12/watching-understanding-ruby-2.1-garbage-collector/)*
212211
213212
> A generational GC (also known as ephemeral GC) divides objects into generations and, on most cycles, will place only the objects of a subset of generations into the initial white (condemned) set. *[Tracing garbage collection](https://en.wikipedia.org/wiki/Tracing_garbage_collection#Generational_GC_.28ephemeral_GC.29)*
214213
215214
So what I think is :
216-
* the number of generation is related to the age of the objects allocations (from Wikipedia *many generational garbage collectors use separate memory regions for different ages of objects*). In my case frequent allocations on generation 51 mean lot's of fresh new objects.
215+
* the number of generations is related to the age of the objects allocations (from Wikipedia *many generational garbage collectors use separate memory regions for different ages of objects*). In my case frequent allocations on generation 51 mean lot's of fresh new objects.
217216
* new objects allocations in younger generations means young objects
218217
* last generations only keep older objects
219218

0 commit comments

Comments
 (0)