Ruby's array.
More...
#include <rarray.h>
Ruby's array.
Definition at line 128 of file rarray.h.
◆ ary
const VALUE RArray::ary[1] |
Embedded elements.
When an array is short enough, it uses this area to store its elements. In this case the length is encoded into the flags.
Definition at line 188 of file rarray.h.
◆ [union]
◆ [union]
union { ... } RArray::aux |
◆ basic
Basic part, including flags and class.
Definition at line 131 of file rarray.h.
◆ capa
Capacity of *ptr
.
A continuous memory region of at least capa
elements is expected to exist at *ptr
. This can be bigger than len
.
Definition at line 153 of file rarray.h.
◆ [struct]
struct { ... } RArray::heap |
Arrays that use separated memory region for elements use this pattern.
◆ len
Number of elements of the array.
Definition at line 143 of file rarray.h.
◆ ptr
Pointer to the C array that holds the elements of the array.
In the old days each array had dedicated memory regions. That is no longer true today, but there still are arrays of such properties. This field could be used to point such things.
Definition at line 175 of file rarray.h.
◆ shared_root
const VALUE RArray::shared_root |
Parent of the array.
Nowadays arrays can share their backend memory regions each other, constructing gigantic nest of objects. This situation is called "shared", and this is the field to control such properties.
Definition at line 166 of file rarray.h.
The documentation for this struct was generated from the following file: