-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rb_check_symbol_cstr is not yet implemented #1814
Comments
Thanks for the bug report!
|
Truffleruby doesn't support rb_check_symbol_cstr() so far, but all symbols in Truffleruby are GC'd anyway. So we can use classic ID2SYM to allocate the Symbol objects. Discussed here: oracle/truffleruby#1814
Thank you @eregon ! I switched symbol allocation to |
@larskanis Thanks!
|
Exactly! Most of the time the symbols are already allocated, so that we allocate strings only when necessary. |
Truffleruby doesn't support rb_check_symbol_cstr() so far, but all symbols in Truffleruby are GC'd anyway. So we can use classic ID2SYM to allocate the Symbol objects. Discussed here: oracle/truffleruby#1814
Truffleruby doesn't support rb_check_symbol_cstr() so far, but all symbols in Truffleruby are GC'd anyway. So we can use classic ID2SYM to allocate the Symbol objects. Discussed here: oracle/truffleruby#1814
I implemented |
Thank you @eregon ! Good to know it's in ruby spec now. |
pg-1.2.0 will probably introduce field names deliverable as symbols. In MRI there are two types of symbols: dynamic and static symbols. PG will primary use dynamic symbols per
rb_check_symbol_cstr()
, to allow GC'ing of field names. Static symbols on the other hand can lead to memory bloat if field names are dynamically generated.Unfortunately Truffleruby doesn't implement
rb_check_symbol_cstr
so that tests fail currently.However the tests run fine on Truffleruby with static symbols allocated by ID2SYM().
So my questions are:
ID2SYM()
to allocate symbols on Truffleruby?rb_check_symbol_cstr()
to make pg-1.2.0 work?The text was updated successfully, but these errors were encountered: