diff options
author | Peter Zhu <peter@peterzhu.ca> | 2022-02-15 09:57:33 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2022-02-16 09:50:29 -0500 |
commit | 969ad5802dfe60c254f2f30514233b05ece8049c (patch) | |
tree | 845ddf4da9c1472ff73f5c0ed7a27b704260ea17 /darray.h | |
parent | 71afa8164d40f18306fc2ee5a1ccc74f2926379b (diff) | |
download | ruby-969ad5802dfe60c254f2f30514233b05ece8049c.tar.gz |
Change feature_index from fake Array to darray
Using a fake (malloc) RArray is not friendly for the garbage
collector. Fake RArray does not have a heap page, so it causes Variable
Width Allocation to crash when we try to implement it on Arrays.
This commit changes feature_index from a RArray to a darray.
Diffstat (limited to 'darray.h')
-rw-r--r-- | darray.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -104,6 +104,8 @@ rb_darray_make_impl((ptr_to_ary), size, sizeof(**(ptr_to_ary)), \ sizeof((*(ptr_to_ary))->data[0]), ruby_xcalloc) +#define rb_darray_data_ptr(ary) ((ary)->data) + // Set the size of the array to zero without freeing the backing memory. // Allows reusing the same array. // |