summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2011-03-07* gc.c (rb_objspace): an initializer must be a constant.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07* gc.c (rb_gc_set_params): allow GC parameter configuration bymatz
environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-12* vm.c (thread_free): reset ruby_current_thread if it points theakr
thread to free. * gc.c (slot_sweep): don't call RUBY_VM_SET_FINALIZER_INTERRUPT if there is no current thread. [ruby-dev:43000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-22* gc.c (Init_GC): move back object_id to Kernel. [ruby-dev:42840]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-17* gc.c (Init_GC): move #__id__ and #object_id to BasicObject.matz
[ruby-dev:42778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-14* gc.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-03* gc.c (rb_objspace_free): With our "lazy-sweep" GC engine, it isshyouhei
possible for an object to survive until its surrounding object space is about to be freed. Those objects, if any, remains not leaked for the rest of a process life. This is problematic because for instance a T_DATA object may have its own destructor to terminate something. * vm.c (ruby_vm_destruct): ruby_current_vm termination should be somewhere after rb_objspace_free for above reason. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-15* gc.c (assign_heap_slot): fix fear of memory leak and memorymame
violation. Coverity Scan found this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-09* gc.c (after_gc_sweep): remove unused variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-04* gc.c (rb_newobj): force garbage_collect() if GC.stress == true.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-04* gc.c (run_final): do not need argument obj.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-04* gc.c (run_final): do not need argument obj.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-04* gc.c (before_gc_sweep): fix commit miss.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-04* gc.c (after_gc_sweep, before_gc_sweep):ko1
invoke rb_sweep_method_entry() as soon as possilbe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-04* gc.c (after_gc_sweep, slot_sweep): finalizers should be invokedko1
as soon as possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-03* gc.c, vm.c, vm_core.h: remove USE_VALUE_CACHE option.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-31* gc.c (finalizer_table, objspace->final.table):ko1
Create finalizer_table at Init_heap(). Remove all null checks of finalizer_table. * gc.c (mark_tbl): skip if no table entries. * gc.c (slot_swee): remove useless need_call_final check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-31* gc.c (rb_objspace_free): finalizers should be called separatelynobu
from freeing objspace. [ruby-dev:42479] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-28* gc.c (before_gc_sweep, run_final): fix decrement timing of final_num.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-27* gc.c (GC.stat): added. [ruby-dev:38607]ko1
* test/ruby/test_gc.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26* class.c, constant.h, gc.c, method.h, object.c, variable.c,mame
vm_insnhelper.c: use struct rb_constant_entry_t as entry of RCLASS_CONST_TBL. RCLASS_CONST_TBL has contained VALUE of constant directly. Now instead rb_const_entry_t is contained in RCLASS_CONST_TBL, rb_const_entry_t is managed by malloc, and have not only the value itself but also visibility flag. This is another preparation for private constant (see [ruby-dev:39685][ruby-core:32698]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26* class.c, gc.c, object.c, variable.c, vm_insnhelper.c,mame
include/ruby/ruby.h: separate RCLASS_CONST_TBL from RCLASS_IV_TBL. RCLASS_IV_TBL has contained not only instance variable table but also constant table. Now the two table are separated to RCLASS_CONST_TBL and RCLASS_IV_TBL. This is a preparation for private constant (see [ruby-dev:39685][ruby-core:32698]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-24* array.c, gc.c, hash.c, object.c, string.c, struct.c,nobu
transcode.c, variable.c, vm.c, vm_insnhelper.c, vm_method.c: replace calls to rb_error_frozen() with rb_check_frozen(). a patch from Run Paint Run Run at [ruby-core:32014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-21* gc.c (gc_lazy_sweep): Variable declarations should be atko1
the head of block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-21* gc.c (objspace_each_objects, rb_objspace_each_objects): usenobu
struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-21* gc.c (objspace_each_objects): fix return with no value.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-21* gc.c (rb_objspace_each_objects): don't lazy sweep innari
rb_objspace_each_objects. [Bug #3940] [ruby-dev:42369] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19Commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19* test/ruby/test_sprintf.rb: fix ML ref. [ruby-core:32848]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13* array.c (rb_ary_and, rb_ary_or), class.c (rb_mod_init_copy),nobu
gc.c (undefine_final), time.c (time_mload): get rid of type-punning casts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* compile.c (iseq_build_body), error.c (set_syserr, get_syserr),nobu
(syserr_initialize), gc.c (define_final, rb_gc_copy_finalizer), (run_final), hash.c (rb_hash_aref, rb_hash_lookup2), (rb_hash_fetch_m, rb_hash_clear, rb_hash_aset, eql_i), iseq.c (iseq_load, iseq_data_to_ary), marshal.c (r_symlink), thread.c (rb_thread_local_aref), variable.c (generic_ivar_remove, ivar_get, rb_const_get_0), (rb_cvar_get), vm.c (rb_vm_check_redefinition_opt_method), vm_insnhelper.c (vm_get_ev_const), vm_method.c (remove_method), ext/iconv/iconv.c (map_charset): use st_data_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* gc.c (obj_free, rb_objspace_call_finalizer): fix truncatingnobu
cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* gc.c (mark_current_machine_context): suppress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* gc.c (gc_profile_result): Index begins with 1.nari
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* gc.c (gc_profile_result): use size_t. based on patches fromnari
Tomoaki NISHIYAMA <tomoakin@kenroku.kanazawa-u.ac.jp> at [ruby-dev:42042]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* thread.c (rb_gc_mark_threads): deprecated.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* test/objspace/test_objspace.rb: added test for objspace.nari
* ext/objspace/objspace.c: considers T_ZOMBIE by lazy sweep GC. * gc.c: considers that dsize was 0. [ruby-dev:42022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-20* gc.c: don't call after_gc_sweep() after when garbage_collect()nari
was called, because rb_sweep_method_entry() free live unlinked method entries. [ruby-core:31169] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]nobu
add parent member. * error.c (rb_typeddata_inherited_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18* gc.c (rb_objspace_each_objects): adjust indent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29* gc.c (unlink_heap_slot, slot_sweep): unlink heaps_slot ofnari
heaps_slot linked list if heaps_slot is empty at slot_sweep. fixed [ruby-dev:41543], [ruby-core:24894]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-18* gc.c (gc_lazy_sweep): clean a warning.naruse
"suggest parentheses around assignment used as truth value" * transcode_data.h (getGB4bt1): clean a warning. "suggest parentheses around arithmetic in operand of |" * transcode_data.h (getGB4bt3): ditto. * vm.c (thread_free): clean a warning. "format 'p' expects type 'void *', but argument 3 has type 'struct rb_mutex_struct *'" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-07* gc.c (rb_obj_id): trivial optimization.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-06* gc.c: set_heaps_increment is notnari
called before gc_makrs of lazy sweeping because live_num not contain finalize objects. So call set_heaps_increment after lazy sweeping if free_num are not enough. And move free_min to struct rb_objspace for above. [ruby-dev:41499] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-04* gc.c (gc_sweep): suppress a warning on VC, again.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-30* gc.c (gc_mark_all_clear): don't call obj_free() innari
gc_mark_all_clear(), because obj_free() may make T_ZOMBIE objects. * gc.c (gc_clear_mark_on_sweep_slots): renamed. * gc.c (rb_objspace_call_finalizer): call gc_clear_mark_on_sweep_slots() before calling mark_tbl(). [ruby-dev:41459] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* thread.c (RB_GC_SAVE_MACHINE_CONTEXT), gc.c (ruby_gc_stress_start):tarui
revert r28078. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* thread.c (RB_GC_SAVE_MACHINE_CONTEXT): start GC tarui
by switching the thread if gc_stress == true * gc.c (ruby_gc_stress_start): dotto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* gc.c (force_chain_object, rb_objspace_call_finalizer): deletemame
finalizer entry after corresponding finalizer is executed. This caused SEGV when test/cgi is executed with GC.stress = true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* gc.c (GC_PROF_TIMER_STOP): regularize `marked' to suppressnobu
warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e