summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2014-03-15gc.c (objspace_xcalloc): fix GC accountingnormal
This hopefully works on all platforms with malloc_usable_size. This may also trigger bugs in places which did not expect GC, too; so maybe some existing code will need RB_GC_GUARD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-15object.c: [DOC] merge rdocnobu
* gc.c (rb_obj_id): remove unused rdoc. * object.c (rb_obj_hash): [DOC] merge unused rdoc from rb_obj_id() in gc.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-14[DOC] add links to `Object#hash`nobu
add links to `Object#hash` to each #`hash` methods rdocs. [Fixes GH-567] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01gc.c: simplify conditionnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01gc.c: fix build for testing w/o RGenGCnormal
* gc.c (ruby_gc_set_params): fix building without RGenGC git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-27adjust indent and stylenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-26* gc.c (heap_pages_free_unused_pages): check tomb page availabilityko1
at first. And return immediately if we don't touch sorted list any more. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-22gc.c: suppress warningsnobu
* gc.c (gc_marks): cast explicitly to suppress warnings by VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-20gc.c: RB_GC_GUARD should be robust enough for any compilernormal
* include/ruby/ruby.h (RB_GC_GUARD): use rb_gc_guarded_ptr_val on non-GCC/MSC * gc.c (rb_gc_guarded_ptr_val): rename and adjust argument. RB_GC_GUARD should be robust enough for any compiler. [ruby-core:60816] [Bug #7805] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* gc.c (get_envparam_double): fix a warning message.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* gc.c: introduce new environment variableko1
"RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR" to control major/minor GC frequency. Do full GC when the number of old objects is more than R * N where R is this factor and N is the number of old objects just after last full GC. * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15* internal.h: Rename macro names: RBIGNUM_FOO to BIGNUM_FOO.akr
(BIGNUM_EMBED_LEN_NUMBITS): Renamed from RBIGNUM_EMBED_LEN_NUMBITS. (BIGNUM_EMBED_LEN_MAX): Renamed from RBIGNUM_EMBED_LEN_MAX. (BIGNUM_SIGN_BIT): Renamed from RBIGNUM_SIGN_BIT. (BIGNUM_SIGN): Renamed from RBIGNUM_SIGN. (BIGNUM_SET_SIGN): Renamed from RBIGNUM_SET_SIGN. (BIGNUM_POSITIVE_P): Renamed from RBIGNUM_POSITIVE_P. (BIGNUM_NEGATIVE_P): Renamed from RBIGNUM_NEGATIVE_P. (BIGNUM_EMBED_FLAG): Renamed from RBIGNUM_EMBED_FLAG. (BIGNUM_EMBED_LEN_MASK): Renamed from RBIGNUM_EMBED_LEN_MASK. (BIGNUM_EMBED_LEN_SHIFT): Renamed from RBIGNUM_EMBED_LEN_SHIFT. (BIGNUM_LEN): Renamed from RBIGNUM_LEN. (RBIGNUM_DIGITS): Renamed from RBIGNUM_DIGITS. (BIGNUM_LENINT): Renamed from RBIGNUM_LENINT. * bignum.c: Follow the above change. * gc.c: Ditto. * marshal.c: Ditto. * math.c: Ditto. * numeric.c: Ditto. * random.c: Ditto. * rational.c: Ditto. * sprintf.c: Ditto. * ext/-test-/bignum/bigzero.c: Ditto. * ext/-test-/bignum/intpack.c: Ditto. * ext/bigdecimal/bigdecimal.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14* include/ruby/intern.h,akr
include/ruby/io.h, include/ruby/ruby.h, include/ruby/win32.h, include/ruby/backward/rubysig.h, bignum.c, gc.c, io.c, process.c, safe.c, struct.c, thread.c, ext/socket/rubysocket.h, ext/-test-/old_thread_select: Remove deprecated definitions [ruby-core:60581] [Feature #9502] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14gc.c: unit suffixnobu
* gc.c (get_envparam_size): accept unit suffix 'k', 'm', and 'g'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-08* gc.c, gc.h (rb_objspace_marked_object_p): added.ko1
This function *ONLY* works just after marking phase, before any sweeping. This function is highly depending current GC implementation and can be removed future version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-07gc.c: ignore empty stringsnobu
* gc.c (get_envparam_size, get_envparam_double): silently ignore empty strings, without any warnings regardless $VERBOSE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-07gc.c: revert returnnobu
* gc.c (get_envparam_size): revert `return` statement removed by accident. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-07gc.c: use size_tnobu
* gc.c (ruby_gc_params_t, get_envparam_size): use size_t for integer environment parameters for sizes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-06gc.c: check numeric stringnobu
* gc.c (get_envparam_int, get_envparam_double): check invalid string as numeric. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-06* gc.c (get_envparam_int): correct warning messsages.ko1
* gc.c (get_envparam_double): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-06* gc.c (get_envparam_int): don't accept a value equals to lowerboundko1
(changed by last commit) because "" or "foo" (not a number) strings are parsed as 0. They should be rejected. * gc.c (get_envparam_double): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-06* gc.c (ruby_gc_set_params): if RUBY_GC_OLDMALLOC_LIMIT is provided,ko1
then set objspace->rgengc.oldmalloc_increase_limit. Without this fix, the env variable RUBY_GC_OLDMALLOC_LIMIT does not work. * gc.c (get_envparam_int): accept a value equals to lowerbounds. * gc.c (get_envparam_double): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05* gc.c (gc_mark_children): STR_ASSOC is no longer available.ko1
Reported by @nagachika. http://d.hatena.ne.jp/nagachika/20140204 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-28vm_core.h: rb_thread_struct::machinenobu
* vm_core.h (rb_thread_struct): aggregate cpu stuff into a struct, so that a debugger can show its content at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19* gc.c: fix typo by @windwiny [fix GH-506]hsbt
* proc.c: ditto * variable.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-10gc.c: fix doc typotmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09* gc.c: Oups, symbols are immediates toomarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09* gc.c: Supplement object_id's rdoc for immediate and frozen string litteralsmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09* gc.c: Fix and remove outdated rdoc for object_idmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21* gc.c (ruby_gc_set_params): don't show obsolete warnings forko1
RUBY_FREE_MIN/RUBY_HEAP_MIN_SLOTS if RUBY_GC_HEAP_FREE_SLOTS/RUBY_GC_HEAP_INIT_SLOTS are given. [Bug #9276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19* gc.c (heap_get_freeobj): improve hot path performance.ko1
* gc.c (heap_get_freeobj_from_next_freepage): replace with heap_get_freepage(). It returns freeobj instead of freepage. This is not on hot path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19* gc.c (newobj_of): don't need to RBASIC_SET_CLASS() which includes WBko1
here because created obj is always YOUNG/INFANT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18gc.c: remove redundant freelist assignmenttmm1
* gc.c (heap_get_freeobj): remove redundant assignment. heap->freelist is set after the while() loop already. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* gc.c (garbage_collect_body): lazy_sweep setting should workko1
without USE_RGENGC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* gc.c (gc_profile_dump_major_reason): fix this function because major_reasonko1
can be OR of multiple reasons. * gc.c (gc_profile_dump_on): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* gc.c (gc_profile_record_get): should return an empty arrayko1
when profiling is active. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* gc.c (gc_profile_clear, gc_profile_enable): remove rest_sweep().ko1
* gc.c: check objspace->profile.current_record before inserting profiling record by new macro gc_prof_enabled(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17gc.c: prototypenobu
* gc.c (gc_finalize_deferred_register): define in prototype style, instead of old K&R style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (rb_objspace_markable_object_p): should check special_const_pko1
first (by is_markable_object()). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (gc_verify_internal_consistency): should not useko1
rb_objspace_each_objects() because it call rest_sweep(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (rb_objspace_markable_object_p): fix last commit (build error).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (rb_objspace_markable_object_p): it should be live objects.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (rb_objspace_each_objects): should not clear dont_lazy_sweepko1
flag in nested case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c: use gc_verify_internal_consistency() instead ofko1
gc_check_before_marks_i() for check consistency on RGENGC_CHECK_MODE >= 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c: introduce GC.verify_internal_consistency method to verify GCko1
internal data structure. Now this method only checks geneartion (old/young) consistency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16gc.c: fix build with RGENGC_ESTIMATE_OLDMALLOC=0tmm1
* gc.c (gc_info_decode): Fix build errors wheb compiled with RGENGC_ESTIMATE_OLDMALLOC=0 * gc.c (objspace_malloc_increase): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 * gc.c (wmap_final_func): Bugfix. Should update *value to new pointer.tarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13gc.c: GC.latest_gc_info reports most interesting major_by flagtmm1
* gc.c (gc_info_decode): Use :major_by=>:nofree as fallback reason when other trigger conditions are present. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13* gc.c (garbage_collect_body): use rb_bug() and explicit error messageko1
instead of using assert(). [Bug #9222] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13* gc.c: rename *shady* func/macros.ko1
* RVALUE_RAW_SHADY() -> RVALUE_WB_PROTECTED_RAW() * RVALUE_SHADY() -> RVALUE_RAW_SHADY() * rgengc_check_shady() -> rgengc_check_relation(). And fix some messages using "shady" to "non-WB-protected". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e