зеркало из https://github.com/github/ruby.git
* gc.c (make_deferred): clear flags to T_ZOMBIE.
* gc.c (slot_sweep_body): fix indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0393a91926
Коммит
d879849b6e
|
@ -1,3 +1,9 @@
|
|||
Wed Jun 19 07:25:35 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (make_deferred): clear flags to T_ZOMBIE.
|
||||
|
||||
* gc.c (slot_sweep_body): fix indent.
|
||||
|
||||
Wed Jun 19 07:18:47 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
|
||||
|
|
9
gc.c
9
gc.c
|
@ -1151,7 +1151,7 @@ free_unused_heaps(rb_objspace_t *objspace)
|
|||
static inline void
|
||||
make_deferred(RVALUE *p)
|
||||
{
|
||||
p->as.basic.flags = (p->as.basic.flags & ~T_MASK) | T_ZOMBIE;
|
||||
p->as.basic.flags = T_ZOMBIE;
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -2200,19 +2200,16 @@ slot_sweep_body(rb_objspace_t *objspace, struct heaps_slot *sweep_slot, const in
|
|||
if ((bitset & 1) && BUILTIN_TYPE(p) != T_ZOMBIE) {
|
||||
if (p->as.basic.flags) {
|
||||
#if GC_PROFILE_MORE_DETAIL
|
||||
if(record)
|
||||
record->removing_objects++;
|
||||
if(record) record->removing_objects++;
|
||||
#endif
|
||||
rgengc_report(3, objspace, "slot_sweep_body: free %p (%s)\n", p, obj_type_name((VALUE)p));
|
||||
#if USE_RGENGC && RGENGC_CHECK_MODE
|
||||
if (objspace->rgengc.during_minor_gc && RVALUE_PROMOTED(p)) rb_bug("slot_sweep_body: %p (%s) is promoted.\n", p, obj_type_name((VALUE)p));
|
||||
if (rgengc_remembered(objspace, (VALUE)p)) rb_bug("slot_sweep_body: %p (%s) is remembered.\n", p, obj_type_name((VALUE)p));
|
||||
#endif
|
||||
if ((deferred = obj_free(objspace, (VALUE)p)) ||
|
||||
(FL_TEST(p, FL_FINALIZE))) {
|
||||
if ((deferred = obj_free(objspace, (VALUE)p)) || (FL_TEST(p, FL_FINALIZE))) {
|
||||
if (!deferred) {
|
||||
p->as.free.flags = T_ZOMBIE;
|
||||
|
||||
RDATA(p)->dfree = 0;
|
||||
}
|
||||
p->as.free.next = deferred_final_list;
|
||||
|
|
Загрузка…
Ссылка в новой задаче