summaryrefslogtreecommitdiff
path: root/bootstraptest/test_objectspace.rb
AgeCommit message (Collapse)Author
2019-11-07Use a monotonically increasing number for object_idJohn Hawthorn
This changes object_id from being based on the objects location in memory (or a nearby memory location in the case of a conflict) to be based on an always increasing number. This number is a Ruby Integer which allows it to overflow the size of a pointer without issue (very unlikely to happen in real programs especially on 64-bit, but a nice guarantee). This changes obj_to_id_tbl and id_to_obj_tbl to both be maps of Ruby objects to Ruby objects (previously they were Ruby object to C integer) which simplifies updating them after compaction as we can run them through gc_update_table_refs. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2019-11-06Revert "Use a monotonically increasing number for object_id"Aaron Patterson
This reverts commit bd2b314a05ae9192b3143e1e678a37c370d8a9ce.
2019-11-06Use a monotonically increasing number for object_idJohn Hawthorn
This changes object_id from being based on the objects location in memory (or a nearby memory location in the case of a conflict) to be based on an always increasing number. This number is a Ruby Integer which allows it to overflow the size of a pointer without issue (very unlikely to happen in real programs especially on 64-bit, but a nice guarantee). This changes obj_to_id_tbl and id_to_obj_tbl to both be maps of Ruby objects to Ruby objects (previously they were Ruby object to C integer) which simplifies updating them after compaction as we can run them through gc_update_table_refs. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/2638
2016-08-30Use qualified namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10* vm_core.h (typedef struct rb_vm_struct): create a newkosaki
'inhibit_thread_createion' field. * thread.c (rb_thread_terminate_all): set inhibit_thread_creation. * thread.c (thread_s_new): don't permit to create new thread if the VM is under destruction. Otherwise evil finalizer code can make SEGV. [Bug #4992][ruby-core:37858] * bootstraptest/test_objectspace.rb: new test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08add test for [ruby-dev:44049].kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02reduce test time.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* bootstraptest/test_objectspace.rb: fix condition.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* bootstraptest/test_objectspace.rb: skip flozen string.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23* bootstraptest/test_knownbug.rb: move solved tests.ko1
* bootstraptest/test_io.rb, test_marshal.rb, test_objectspace.rb: ditto. * test/ruby/test_integer.rb, test_regexp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-01* gc.c (id2ref): T_VALUES is less than T_BLOCK. [ruby-dev:31911]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e