At some point during JRuby 10 we decided to pre-alloc
get_array_of_string. Later JRuby API changes made it appear
like those new APIs caused this but it was pre-alloc.
The problem is sassc (or FFI) decides to ask for an array
or strings and the size of the memory alloced is MAX_LONG (big
question on why unrelated to this issue). get_array_of_strings
has an if check for null memory and immediately exits the fill
loop and basically makes a zero length array. By pre-allocing
we basically do not ever see that this is a small array.
I reverted to using an empty array like 9.4 still does.
At some point during JRuby 10 we decided to pre-alloc get_array_of_string. Later JRuby API changes made it appear like those new APIs caused this but it was pre-alloc.
The problem is sassc (or FFI) decides to ask for an array or strings and the size of the memory alloced is MAX_LONG (big question on why unrelated to this issue). get_array_of_strings has an if check for null memory and immediately exits the fill loop and basically makes a zero length array. By pre-allocing we basically do not ever see that this is a small array.
I reverted to using an empty array like 9.4 still does.