mirror of
https://github.com/rubyjs/mini_racer
synced 2023-03-27 23:21:28 -04:00
![]() rb_thread_call_without_gvl may raise exceptions and prevent free(3) from firing. Instead of relying on malloc(3) and free(3), rely on the Ruby GC to recover memory on exceptions. In most cases, alloca() is used and malloc/free are avoided entirely. alloca(0) works with all compilers tested (clang 10..12, gcc 9.3), so there's no need to create extra branches for the rare argc == 0 case. RB_ALLOCV_N and RB_ALLOCV_END are documented in Ruby 3.1 public headers (while functions those macros use internally are private). They are used by the standard 'etc', 'date', and 'openssl' C extensions and exist in their current ("RB_"-prefixed) form since Ruby 2.3. The non-prefixed variants (ALLOCV_N, ALLOCV_END) have existed since Ruby 1.9.3. |
||
---|---|---|
.. | ||
mini_racer_extension | ||
mini_racer_loader |