diff options
author | Lourens Naudé <lourens@bearmetal.eu> | 2020-01-04 00:45:58 +0000 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-01-11 14:40:36 +1300 |
commit | 40c57ad4a13898760b81a99dac181e5bf61afe47 (patch) | |
tree | 346d0d3976425a6211bfc8e1e5ece4a0411de730 /cont.c | |
parent | b53d8230f1fed0f99a8a852d853bbd9b5c353fed (diff) |
Let execution context local storage be an ID table
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2814
Diffstat (limited to 'cont.c')
-rw-r--r-- | cont.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -27,6 +27,7 @@ #include "internal/warnings.h" #include "mjit.h" #include "vm_core.h" +#include "id_table.h" static const int DEBUG = 0; @@ -1018,7 +1019,7 @@ fiber_free(void *ptr) //if (DEBUG) fprintf(stderr, "fiber_free: %p[%p]\n", fiber, fiber->stack.base); if (fiber->cont.saved_ec.local_storage) { - st_free_table(fiber->cont.saved_ec.local_storage); + rb_id_table_free(fiber->cont.saved_ec.local_storage); } cont_free(&fiber->cont); @@ -1037,7 +1038,7 @@ fiber_memsize(const void *ptr) * vm.c::thread_memsize already counts th->ec->local_storage */ if (saved_ec->local_storage && fiber != th->root_fiber) { - size += st_memsize(saved_ec->local_storage); + size += rb_id_table_memsize(saved_ec->local_storage); } size += cont_memsize(&fiber->cont); return size; |