aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
Commit message (Collapse)AuthorAgeFilesLines
* * gc.c , gc.h (rb_obj_info): export obj_info(VALUE) for debugging.ko12015-05-311-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h: add VM_METHOD_TYPE_ALIAS rb_method_definition_t::typeko12015-05-301-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to fix [Bug #11173]. Now, inter class/method alias creates new method entry VM_METHOD_TYPE_ALIAS, which has an original method entry. * vm_insnhelper.c (find_defiend_class_by_owner): added. Search corresponding defined_class from owner class/module. * vm_method.c (rb_method_entry_get_without_cache): return me->klass directly for defined_class. Now, no need to check me->klass any more. * vm_method.c (method_entry_set0): separated from method_entry_set(). * vm_method.c (rb_alias): make method entry has VM_METHOD_TYPE_ALIAS. * vm_method.c (release_method_definition): support VM_METHOD_TYPE_ALIAS. * vm_method.c (rb_hash_method_definition): ditto. * vm_method.c (rb_method_definition_eq): ditto. * vm_method.c (release_method_definition): ditto. * vm_insnhelper.c (vm_call_method): ditto. * vm_insnhelper.c (vm_method_cfunc_entry): ditto. * vm_eval.c (vm_call0_body): ditto. * gc.c (mark_method_entry): ditto. * proc.c (method_def_iseq): ditto. * proc.c (method_cref): ditto. * proc.c (rb_method_entry_min_max_arity): ditto. * test/ruby/test_alias.rb: add tests. * test/ruby/test_module.rb: fix a test to catch up current behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: mark stress_to_classnobu2015-05-271-0/+2
| | | | | | * gc.c (gc_mark_roots): stress_to_class is also a GC root. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: stress_to_classnobu2015-05-271-0/+59
| | | | | | | | | | | | * gc.c (newobj_of): debug feature to fail allocation of particular classes. * gc.c (rb_gcdebug_add_stress_to_class): add classes to the list. * gc.c (rb_gcdebug_remove_stress_to_class): remove classes from the list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: warn old namesnobu2015-05-201-0/+3
| | | | | | | * include/ruby/ruby.h (rb_data_typed_object_alloc), (rb_data_object_alloc): warn use of old names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: add old namesnobu2015-05-191-0/+11
| | | | | | | | | | * include/ruby/ruby.h (rb_data_typed_object_alloc), (rb_data_object_alloc): add old names for source level backward compatibilities. * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc): add aliases for binary level backward compatibilities. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: remove ifdefnobu2015-05-181-33/+31
| | | | | | * gc.c (obj_info): remove needless ifdef, and adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: rename alloc as wrapnobu2015-05-161-5/+5
| | | | | | | | * gc.c (rb_data_object_wrap, rb_data_typed_object_wrap): rename alloc as wrap. these functions do not allocate data pointers but just wrap the given pointers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: fix possible memory leaknobu2015-05-101-0/+16
| | | | | | | | * include/ruby/ruby.h (Data_Make_Struct, TypedData_Make_Struct): allocate wrapper data object before allocating DATA_PTR to get rid of possible memory leak when the former failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: never call dmark for NULLnobu2015-05-101-6/+8
| | | | | | | * gc.c (gc_mark_children): call dmark function for non-NULL pointers only, so that DATA_PTR can be NULL safely now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: event hook thread argumentnobu2015-04-261-3/+2
| | | | | | * gc.c (gc_event_hook_body): move th to an argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_mark_roots): fox to work PRINT_ROOT_TICKS.ko12015-04-231-6/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * doc/contributors.rdoc: fix a typo. Patch by @davydovantonhsbt2015-04-151-1/+1
| | | | | | | | | | [fix GH-872][ci skip] * doc/syntax/methods.rdoc: ditto. * ext/digest/sha2/sha2.c: ditto. * ext/socket/ipsocket.c: ditto. * ext/tk/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: [DOC] Improve documentation for ObjectSpace.count_objectszzak2015-04-141-2/+8
| | | | | | | with regards to `:TOTAL` key, with patch by @schneems [Fixes GH-871] https://github.com/ruby/ruby/pull/871 [Bug #11067] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: Document require name for ObjectSpace methods.hsbt2015-04-121-0/+2
| | | | | | [ci skip][fix GH-860] Patch by @schneems git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (objspace_allrefs_destruct_i): fix a typo.hsbt2015-03-291-2/+2
| | | | | | [Bug #11013] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: rb_imemo_new_debugnobu2015-03-271-2/+3
| | | | | | | | * internal.h (rb_imemo_new_debug): pretend rb_imemo_new. * gc.c (rb_imemo_new_debug): share with rb_imemo_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_writebarrier_generational): fix messages for rb_bug().ko12015-03-241-6/+6
| | | | | | | | | Remove `rb_' prefix. * gc.c (gc_writebarrier_incremental): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_info): obj_info() can receive internal objects.ko12015-03-201-15/+12
| | | | | | | | * gc.c (check_rvalue_consistency): obj_info() returns const char *. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r50031 because it includes unexpected patchko12015-03-201-12/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_info): obj_info() can receive internal objects.ko12015-03-201-15/+12
| | | | | | | | * gc.c (check_rvalue_consistency): obj_info() returns const char *. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_info): show class name and T_DATA type_name.ko12015-03-201-5/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_copy_wb_protected_attribute): `dest' can be WB unprotected.ko12015-03-191-6/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_copy_wb_protected_attribute): demote `dest' object.ko12015-03-191-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c, internal.h: export rb_gc_verify_internal_consistency().ko12015-03-191-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_info): show allocation site if GC_DEBUG is not 0.ko12015-03-191-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (newobj_of): fix RGENGC_OLD_NEWOBJ_CHECK logics.ko12015-03-191-5/+3
| | | | | | | | | * skip on incremental marking because not sure what happen :p * rb_gc_writebarrier_remember() is enough to mark children. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_copy_wb_protected_attribute): need demote for old objects.ko12015-03-191-2/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (IMEMO_DEBUG): added.ko12015-03-181-0/+26
| | | | | | | | | | * internal.h: remove unused FL_IMEMO_MARK_V[0-3]. * gc.c (rb_imemo_new_debug): added. * gc.c (obj_info): show imemo type name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (RGENGC_OLD_NEWOBJ_CHECK): add check mechanism.ko12015-03-181-0/+33
| | | | | | | | | | | If RGENGC_OLD_NEWOBJ_CHECK > 0, then create old objects (not new objects) periodically. Create one old objects per RGENGC_OLD_NEWOBJ_CHECK objects are created. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (check_rvalue_consistency): refactoring.ko12015-03-181-15/+35
| | | | | | | | | | | | | | | * not inline on RGENGC_CHECK_MODE > 0. * check SPECIAL_CONST_P(obj) first. * add a check that remembered_bit is only TRUE when old (age == 3). * gc.c (RVALUE_DEMOTE): should clear RVALUE_REMEMBERED bit. remembered_bit should be TRUE only for old (age == 3) objects. Actually there are no effect because demoted objects will be uncollectible WB unprotected objects (marked at the begginig of every minor GC). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: rename terminologies.ko12015-03-181-56/+60
| | | | | | | | | | | | | | | | | * long_lived -> uncollectible: because this bitmap does not mean "long lived objects in past", but means "prohibit collection thse objects until next major GC". Uncollectible objects consist of two types objects, one is old objects (WB protected objects which age == 3) and another is uncollectible WB unprotected objects which are referred from old objects * remembered_wb_unprotected_objects -> uncollectible_wb_unprotected_objects: because uncollectible objects does not mean remembered objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_writebarrier_generational): add an alternative writeko12015-03-181-3/+21
| | | | | | | | | | | | | | | | | | | | barrier (WB) implementation. When finding reference from [Old obj] to [New obj] by WB, current implementation marks [Old obj] as remembered old objects and marks chilldren of [Old obj] at the beggining of marking. Added (but disabled) code changes current behaviour. This fix promote [New obj] to old and marks as a remembered old object. We can assume "new objects referred from old objects are maybe long-lived old objects". Disadvantage of added algorithm is we may promote unwilling short-lived objects. For example, consider many new objects push and pop to an old stack object. All of new objects (short-lived objects) promote to old objects unexpectedly. To compare these behaviour, I add this new code (but disabled it). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (RVALUE_PROMOTE_RAW): rename to RVALUE_OLD_LONG_LIVED_SET()ko12015-03-181-3/+3
| | | | | | | | to make clear. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (check_rvalue_consistency): do not need to check is_sweeping().ko12015-03-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: use rb_gc_writebrrier() simply.ko12015-03-171-37/+48
| | | | | | | | | | | | | | | | | | | | | | For incremental GC, we need to get a pointer to the objspace. We can share this pointer for the following WB process. And considering icache hit ratio, prcess in the GC. * gc.c (rb_gc_writebarrier): added. * gc.c (gc_writebarrier_generational, gc_writebarrier_incremental): make them NOINLINE because inlining them into rb_gc_writebarrier() makes a prologue code of rb_gc_writebarrier() longer (storing callee save registers). This patch improve the performance of WB on micro-benchmarks. name ruby 2.1 trunk modified vm1_gc_wb_ary* 0.511 0.632 0.532 vm1_gc_wb_ary_promoted* 0.578 0.701 0.674 vm1_gc_wb_obj* 0.419 0.575 0.492 vm1_gc_wb_obj_promoted* 0.537 0.664 0.618 (sec) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: RGENGC_CHECK_MODE should be 0.ko12015-03-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: use T_IMEMO to represent `struct MEMO' value.ko12015-03-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | memo->v1 and memo->v2 is WB protected values. So use MEMO_V1/V2_SET() macros to set these values. memo->u3 is ambiguous (sometimes a VALUE, sometimes an integer value), so use gc_mark_maybe() in gc.c to mark it. Rename NEW_MEMO() to MEMO_NEW(). Move MEMO_FOR and NEW_MEMO_FOF macros from node.h. Export a rb_imemo_new() function for ext/ripper. * node.h: remove NODE_MEMO. * enum.c: catch up these change. * enumerator.c: ditto. * load.c: ditto. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c (gc_mark_children): mark imemo_memo type. * parse.y (new_args_gen): use T_IMEMO. (I'm not sure it is working correctly...) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h: remove NODE_IFUNC, NEW_IFUNC.ko12015-03-111-0/+4
| | | | | | | | | | | | | | | | | * internal.h: use T_IMEMO for IFUNC. rename `struct IFUNC' to `struct vm_ifunc' and move the definition from vm_insnhelper.h. Add imemo_ifunc. * gc.c (gc_mark_children): mark imemo_ifunc type T_IMEMO object. * compile.c: catch up these changes. * proc.c: ditto. * vm_core.h (RUBY_VM_IFUNC_P): ditto. * vm_eval.c (rb_iterate): ditto. * vm_insnhelper.c: ditto. * ext/objspace/objspace.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.h: use T_IMEMO to create THROW_DATA.ko12015-03-111-0/+4
| | | | | | | | | | | | | | | | | Add THROW_DATA_NEW(). * internal.h: move defnition of `struct THROW_DATA' from vm_insnhelper.h to internal.h. Rename `THROW_DATA' to `vm_throw_data'. * eval_intern.h (THROW_DATA_P): move to internal.h. THROW_DATA is no longer T_NODE, so check T_IMEMO. * gc.c (gc_mark_children): mark THROW_DATA. * vm.c: catch up these changes. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c: use T_IMEMO to create SVAR.ko12015-03-111-1/+8
| | | | | | | | | | | | * internal.h, vm_insnhelper.h: move definition `struct SVAR' from vm_insnhelper.h to internal.h. And rename it to strcut vm_svar. new imemo_type imemo_svar is added. * gc.c (gc_mark_children): mark imemo_svar. * node.c (rb_gc_mark_node): remove useless marking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: introduce new type T_IMEMO.ko12015-03-111-1/+27
| | | | | | | | | | | | | | | | | | | | | T_IMEMO is Internal Memo type, internal use only. T_IMEMO has same purpose of NODE_MEMO. To insert T_IMEMO, type numbers are modified a little. * internal.h: define struct RIMemo. Each RIMemo objects has imemo_type. We can observe it by the imemo_type() function. * gc.c (rb_imemo_new): added. * node.h: remove NODE_CREF and NEW_CREF(). * node.c (rb_gc_mark_node): ditto. * vm.c (vm_cref_new): use rb_imem_new(). * vm_eval.c: ditto. * vm_eval.c (eval_string_with_cref): * vm_eval.c (rb_type_str): * vm_insnhelper.c: use RIMemo objects for CREF. * ext/objspace/objspace.c: support T_IMEMO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: fix memory leak by prepend method.ko12015-03-111-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | It is easy to reproduce with such script: module M; def bar; end; end loop{ Class.new do def foo; end prepend M end } * gc.c (obj_free): free T_ICLASS::m_tbl if it is created by prepend. To recognize it, check RICLASS_IS_ORIGIN flag. * gc.c (gc_mark_children): T_ICLASS objects only need to mark T_ICLASS::m_tbl if RICLASS_IS_ORIGIN is set. * gc.c (obj_memsize_of): count T_ICLASS if RICLASS_IS_ORIGIN is set. * internal.h (RCLASS_SET_ORIGIN): add to set RCLASS_SET_ORIGIN. TODO: The word `origin' seems not good name. We need to invent another good name. * class.c: use RCLASS_SET_ORIGIN(). * class.c (class_alloc): zero clear rb_classext_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * fix namespace issue on singleton class expressions. [Bug #10943]ko12015-03-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vm_core.h, method.h: remove rb_iseq_t::cref_stack. CREF is stored to rb_method_definition_t::body.iseq_body.cref. * vm_insnhelper.c: modify SVAR usage. When calling ISEQ type method, push CREF information onto method frame, SVAR located place. Before this fix, SVAR is simply nil. After this patch, CREF (or NULL == Qfalse for not iseq methods) is stored at the method invocation. When SVAR is requierd, then put NODE_IF onto SVAR location, and NDOE_IF::nd_reserved points CREF itself. * vm.c (vm_cref_new, vm_cref_dump, vm_cref_new_toplevel): added. * vm_insnhelper.c (vm_push_frame): accept CREF. * method.h, vm_method.c (rb_add_method_iseq): added. This function accepts iseq and CREF. * class.c (clone_method): use rb_add_method_iseq(). * gc.c (mark_method_entry): mark method_entry::body.iseq_body.cref. * iseq.c: remove CREF related codes. * insns.def (getinlinecache/setinlinecache): CREF should be cache key because a different CREF has a different namespace. * node.c (rb_gc_mark_node): mark NODE_IF::nd_reserved for SVAR. * proc.c: catch up changes. * struct.c: ditto. * insns.def: ditto. * vm_args.c (raise_argument_error): ditto. * vm_eval.c: ditto. * test/ruby/test_class.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_info): show node name too.ko12015-03-051-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: remove struct method_table_wrapper.ko12015-03-051-29/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct method_table_wrapper was introduced to avoid duplicate marking for method tables. For example, `module M1; def foo; end; end` make one method table (mtbl) contains a method `foo`. M1 (T_MODULE) points mtbl. Classes C1 and C2 includes M1, then two T_ICLASS objects are created and they points mtbl too. In this case, three objects (one T_MODULE and two T_ICLASS objects) points same mtbl. On marking phase, these three objects mark same mtbl. To avoid such duplication, struct method_table_wrapper was introduced. However, created two T_ICLASS objects have same or shorter lifetime than M1 (T_MODULE) object. So that we only need to mark mtbl from M1, not from T_ICLASS objects. This patch tries marking only from M1. Note that one `Module#prepend` call creates two T_ICLASS objects. One for refering to a prepending Module object, same as `Module#include`. We don't nedd to care this T_ICLASS. One for moving original mtbl from a prepending class. We need to mark such mtbl from this T_ICLASS object. To mark the mtbl, we need to use `RCLASS_ORIGIN(klass)` on marking from a prepended class `klass`. * class.c: ditto. * eval.c (rb_using_refinement): ditto. * gc.c: ditto. * include/ruby/ruby.h: define m_tbl directly. The definition of struct RClass should be moved to (srcdir)/internal.h. * method.h: remove decl of rb_free_m_tbl_wrapper(). * object.c: use RCLASS_M_TBL() directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: hide internal objectsnobu2015-03-011-0/+3
| | | | | | | * gc.c (id2ref): prohibit from accessing internal objects. [ruby-core:68348] [Bug #10918] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_objspace_call_finalizer): control GC execution duringko12015-02-221-12/+9
| | | | | | | | | | | | | | | | | | | | | | force firnalizations at the end of interpreter process. [Bug #10768] 1) Prohibit incremental GC while running Ruby-level finalizers to avoid any danger. 2) Prohibit GC while invoking T_DATA/T_FILE data structure because these operations break object relations consistency. This patch can introduce another memory consuming issue because Ruby-level finalizers can run after (2), GC is disabled. However, basically object consistency was broken at (2) as I described above. So that running Ruby-level finalizers contains danger originally. Because of this point, I need to suggest to remove these 3 lines (invoking remaining finalizers). And add a rule to add that finalizers should not add new finalizers, or say there is no guarantee to invoke finalizers that added by another finalizer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: disable lazy sweeping checknobu2015-02-081-0/+2
| | | | | | | * gc.c (rb_objspace_free): disable provisionally lazy sweeping check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: disable gc_rest after finalizationnobu2015-02-081-0/+2
| | | | | | | * gc.c (rb_objspace_call_finalizer): disable provisionally gc_rest as it breaks RVALUE consistency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e