Re:Ruby Garbage Collection Deep Dive: Tri-Color Mark and Sweep
by eklitzke on Thursday February 18, 2021 @01:42PM
(#26183760)
Does rvalue mean something different here than it normally means? Normally rvalues refer to temporary values.
[ Parent
| on HN ]
Re:Ruby Garbage Collection Deep Dive: Tri-Color Mark and Sweep
by tenderlove on Thursday February 18, 2021 @01:55PM
(#26183958)
RVALUE is the base type in Ruby's heap. It refers specifically to [this struct](https://github.com/ruby/ruby/blob/7bd93293621b85a87e7e117317...). All Ruby objects are instances of an RVALUE struct.
Hope that helps!
Re:Ruby Garbage Collection Deep Dive: Tri-Color Mark and Sweep
by WJW on Thursday February 18, 2021 @05:32PM
(#26186706)
In particular in Ruby it derives from "Ruby value" rather than the C/C++ rvalues that can appear on the righthand side of an assignment.
Re:Ruby Garbage Collection Deep Dive: Tri-Color Mark and Sweep
by jemmaissroff on Thursday February 18, 2021 @03:06PM
(#26184740)
The first post in the series also explains RVALUES in the context of the Ruby Heap if it's helpful https://jemma.dev/blog/gc-internal
Re:Ruby Garbage Collection Deep Dive: Tri-Color Mark and Sweep
by snvsn on Thursday February 18, 2021 @01:56PM
(#26183964)
Yes. In the Ruby VM, an RVALUE [0] is a union (a "generic type") of structs that represent all the different kinds of Ruby object types and a couple of runtime types.
[0] https://sonots.github.io/ruby-capi/db/d8e/struct_r_v_a_l_u_e...
Re:Ruby Garbage Collection Deep Dive: Tri-Color Mark and Sweep
by dragontamer on Thursday February 18, 2021 @01:53PM
(#26183934)
Rvalue seems to be a 40-byte "Ruby Object". (If an object takes up more than 40-bytes, it gets an additional allocation, and the first 40-bytes go into the rvalue "slot").