diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-18 08:15:33 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-18 08:15:33 +0000 |
commit | 157401a9a1c921ebd5c77e23cd10fd90c1d3e26f (patch) | |
tree | be0526283e32aa92397aa82c6e70ff852671796d /vm_core.h | |
parent | 1b327a0804614af77424657003dea3e77b01d2cb (diff) |
merge revision(s) 54484: [Backport #12095]
* vm_core.h (rb_vm_struct): make at_exit a single linked list but
not RArray, not to mark the registered functions by the write
barrier. based on the patches by Evan Phoenix.
[ruby-core:73908] [Bug #12095]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -459,6 +459,14 @@ enum ruby_basic_operators { #define GetVMPtr(obj, ptr) \ GetCoreDataFromValue((obj), rb_vm_t, (ptr)) +struct rb_vm_struct; +typedef void rb_vm_at_exit_func(struct rb_vm_struct*); + +typedef struct rb_at_exit_list { + rb_vm_at_exit_func *func; + struct rb_at_exit_list *next; +} rb_at_exit_list; + struct rb_objspace; struct rb_objspace *rb_objspace_alloc(void); void rb_objspace_free(struct rb_objspace *); @@ -527,11 +535,7 @@ typedef struct rb_vm_struct { struct rb_objspace *objspace; - /* - * @shyouhei notes that this is not for storing normal Ruby - * objects so do *NOT* mark this when you GC. - */ - struct RArray at_exit; + rb_at_exit_list *at_exit; VALUE *defined_strings; st_table *frozen_strings; |