1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping

for debugging. [Feature #8024] [ruby-dev:47135]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nari 2013-03-24 04:53:44 +00:00
parent 3ad60679e3
commit e54daddac4
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Sun Mar 24 13:42:24 2013 Narihiro Nakamura <authornari@gmail.com>
* gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping
for debugging. [Feature #8024] [ruby-dev:47135]
Sun Mar 24 12:55:47 2013 Narihiro Nakamura <authornari@gmail.com> Sun Mar 24 12:55:47 2013 Narihiro Nakamura <authornari@gmail.com>
* gc.c: We have no chance to expand the heap when lazy sweeping is * gc.c: We have no chance to expand the heap when lazy sweeping is

5
gc.c
View file

@ -98,6 +98,9 @@ static ruby_gc_params_t initial_params = {
#ifndef GC_PROFILE_MORE_DETAIL #ifndef GC_PROFILE_MORE_DETAIL
#define GC_PROFILE_MORE_DETAIL 0 #define GC_PROFILE_MORE_DETAIL 0
#endif #endif
#ifndef GC_ENABLE_LAZY_SWEEP
#define GC_ENABLE_LAZY_SWEEP 1
#endif
typedef struct gc_profile_record { typedef struct gc_profile_record {
double gc_time; double gc_time;
@ -2043,7 +2046,7 @@ gc_prepare_free_objects(rb_objspace_t *objspace)
{ {
int res; int res;
if (objspace->flags.dont_lazy_sweep) { if (!GC_ENABLE_LAZY_SWEEP || objspace->flags.dont_lazy_sweep) {
if (heaps_increment(objspace)) { if (heaps_increment(objspace)) {
return; return;
} }