mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Release ALLOCV buffer
Release `ALLOCV` buffers promptly when they are no longer needed.
This commit is contained in:
1 parent
fccc81a3e6
commit
6c92d5b781
3 files changed
+7
-2
Notes:
git
2026-10-02 06:03:52 +00:00
No files matched your search
@@ -13732,6 +13732,7 @@ ibf_dump_outer_variables(struct ibf_dump *dump, const rb_iseq_t *iseq)
|
||||
ibf_dump_write_small_value(dump, ibf_dump_id(dump, id));
|
||||
ibf_dump_write_small_value(dump, val);
|
||||
}
|
||||
ALLOCV_END(buff);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
||||
@@ -6941,6 +6941,9 @@ pm_compile_scope_node(rb_iseq_t *iseq, pm_scope_node_t *scope_node, const pm_nod
|
||||
keyword->table = (ID *)&ISEQ_BODY(iseq)->local_table[keyword_start_index];
|
||||
}
|
||||
|
||||
local_table_for_iseq = NULL;
|
||||
if (idtmp) ALLOCV_END(idtmp);
|
||||
|
||||
//********STEP 5************
|
||||
// Goal: compile anything that needed to be compiled
|
||||
if (optionals_list && optionals_list->size) {
|
||||
|
||||
@@ -4093,8 +4093,6 @@ rb_str_append_as_bytes(int argc, VALUE *argv, VALUE str)
|
||||
break;
|
||||
}
|
||||
|
||||
RB_GC_GUARD(t0);
|
||||
|
||||
clear_cr:
|
||||
// If no fast path was hit, we clear the coderange.
|
||||
// append_as_bytes is predominantly meant to be used in
|
||||
@@ -4104,6 +4102,7 @@ rb_str_append_as_bytes(int argc, VALUE *argv, VALUE str)
|
||||
// situations.
|
||||
ENC_CODERANGE_CLEAR(str);
|
||||
keep_cr:
|
||||
ALLOCV_END(t0);
|
||||
return str;
|
||||
}
|
||||
|
||||
@@ -9950,6 +9949,8 @@ tr_trans_pairs(VALUE str, VALUE pairs_val)
|
||||
}
|
||||
}
|
||||
|
||||
ALLOCV_END(pairs_handle);
|
||||
|
||||
if (!modify) {
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user