Skip to content

Commit b2d9ab4

Browse files
author
Benoit Tigeot
committed
Add tag to questions
1 parent e5aa498 commit b2d9ab4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ I will add more questions in the future using pull requests so feel free to watc
1010

1111
Here is a list of questions I have. Feel free to make a PR to answer them.
1212

13-
* Retained Vs Allocated: Does an object that is allocated can turn to be retained because he is still present after few GC (["retained" vs "allocated" from memory_profiler Readmd](https://github.com/SamSaffron/memory_profiler/blob/master/README.md)) ?
13+
* **[Answered]** Retained Vs Allocated: Does an object that is allocated can turn to be retained because he is still present after few GC (["retained" vs "allocated" from memory_profiler Readmd](https://github.com/SamSaffron/memory_profiler/blob/master/README.md)) ?
1414

1515
Yes. The term "allocated" vs "retained" may vary depending on the tool you use, but, for example, in `memory_profiler`, "retained" means "survived a major GC".
1616

@@ -108,7 +108,7 @@ Here is a list of questions I have. Feel free to make a PR to answer them.
108108
| hashes | yes |
109109
| what else? | ? |
110110

111-
* Why people are always scared about time spent in GC when the Newrelic graph of my app show an average time spent in GC that is 0.0676% ?
111+
* **[Partially answered]** Why people are always scared about time spent in GC when the Newrelic graph of my app show an average time spent in GC that is 0.0676% ?
112112

113113
[Nate Berkopec's opinion](https://github.com/benoittgt/understand_ruby_memory/pull/5) - most people *assume* garbage collection takes a lot of time in a GC'd language. GC languages are slower than non-GC'd languages, therefore it must be GC that is slow. However, it's not just *GC* but *allocation* and the record keeping that goes along with it that slows Ruby programs. Creating an object isn't just the simple process of writing to some memory location, we have to do a bunch of checks, look for free space in the ObjectSpace, etc etc. So a GC'd language *is* slower, but we actually incur most of the cost *while running the program*, not *when garbage collecting*.
114114

0 commit comments

Comments
 (0)