aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authorLourens Naudé <lourens@bearmetal.eu>2020-01-04 00:45:58 +0000
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-01-11 14:40:36 +1300
commit40c57ad4a13898760b81a99dac181e5bf61afe47 (patch)
tree346d0d3976425a6211bfc8e1e5ece4a0411de730 /cont.c
parentb53d8230f1fed0f99a8a852d853bbd9b5c353fed (diff)
downloadruby-40c57ad4a13898760b81a99dac181e5bf61afe47.tar.gz
Let execution context local storage be an ID table
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cont.c b/cont.c
index d4a2bf9353..df197a7363 100644
--- a/cont.c
+++ b/cont.c
@@ -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;