diff options
author | Aaron Patterson <[email protected]> | 2020-07-23 16:00:28 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2020-07-27 12:40:01 -0700 |
commit | 35ba2783fe6b3316a6bbc6f00bf975ad7185d6e0 (patch) | |
tree | 6b5ebe0fbd35d375f5b111d6cb8557be31b34e5b /node.h | |
parent | c5ae79d7e953e778c89d0991e82b62a3d78fb5be (diff) |
Use a linked list to eliminate imemo tmp bufs for managing local tables
This patch changes local table memory to be managed by a linked list
rather than via the garbage collector. It reduces allocations from the
GC and also fixes a use-after-free bug in the concurrent-with-sweep
compactor I'm working on.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3360
Diffstat (limited to 'node.h')
-rw-r--r-- | node.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -401,11 +401,13 @@ typedef struct rb_ast_body_struct { typedef struct rb_ast_struct { VALUE flags; node_buffer_t *node_buffer; + ID *local_lists; rb_ast_body_t body; } rb_ast_t; rb_ast_t *rb_ast_new(void); void rb_ast_mark(rb_ast_t*); void rb_ast_update_references(rb_ast_t*); +void rb_ast_add_local_table(rb_ast_t*, ID *buf); void rb_ast_dispose(rb_ast_t*); void rb_ast_free(rb_ast_t*); size_t rb_ast_memsize(const rb_ast_t*); |