20 Commits

Author SHA1 Message Date
Rory OConnell 5f4a27217e Separate memsize_of and memsize_of_all to a separate gem; #5040
Those methods are originally CRuby specific.

Co-authored-by: Yukihiro "Matz" Matsumoto <matz@ruby.or.jp>
2020-07-19 15:36:08 -07:00
Yukihiro "Matz" Matsumoto c9ea39843b Remove some tests from mruby-objectspace gem; #5040
Those tests succeeds only on some configuration.
2020-07-20 06:05:06 +09:00
Rory OConnell fe1ec9afdd Add ObjectSpace.memsize_of_all 2020-07-17 20:09:44 -07:00
Yukihiro "Matz" Matsumoto 9f52bcfca9 Fix memsize_of Fibers; #5032
Memory size of a Fiber is calculated by stack size only in CRuby.
2020-07-17 11:50:12 +09:00
Yukihiro "Matz" Matsumoto f00657ead7 Remove recursive memsize_of; #5032
This is enhancement from CRuby's `memsize_of`. We need to change the
CRuby first for the enhancement.
2020-07-17 11:15:07 +09:00
Rory O'Connell 4d32c671a7 Finishing out memsize_of recursion 2020-07-14 23:30:35 -07:00
Rory OConnell 5759256ff8 Update tests for new calculations 2020-07-13 16:00:49 -07:00
Rory OConnell 338c8538c9 Initial ObjectSpace.memsize_of implementation 2020-07-09 18:52:31 -07:00
KOBAYASHI Shuji 92f00d3e58 Fix missing assertions in mruby-objectspace test 2019-06-02 19:15:20 +09:00
Yukihiro "Matz" Matsumoto cca19532c5 Remove Kernel#class_defined? which is not available in CRuby; #3829 2019-01-03 11:34:35 +09:00
Yukihiro "Matz" Matsumoto 6a9efd6849 Invoke mrb_full_gc() before ObjectSpace.count_objects. 2017-11-19 12:19:46 +09:00
take_cheeze f9076230f2 Fix crash in method call in ObjectSpace.each_object block.
* Filter `MRB_TT_ENV` and `MRB_TT_ICLASS`.
* Set `mrb->string_class` in `mrb_init_exception` instead.
2014-06-28 00:45:47 +09:00
take_cheeze c4f14755a7 Always increment total field of os_count_struct in callback.
Check sum of `ObjectSpace.count_objects` values is twice of total objects count.
(Which is CRuby's behavior.)
2014-04-06 18:13:29 +09:00
take_cheeze 6d75f89ee5 Support :T_FIBER in ObjectSpace.count_objects . 2014-04-03 17:18:46 +09:00
take_cheeze 889a2e0932 Use CRuby compatible key in ObjectSpace.count_objects . 2014-03-27 07:06:44 +09:00
take_cheeze e5922aa896 Implement ObjectSpace.each_object . 2014-03-25 08:32:50 +09:00
Daniel Bovensiepen aa3ff53f04 Improve test of mruby-objectspace-ext GEM 2013-08-04 22:42:57 +08:00
Ryan Scott da6b61db79 Removed debug output 2013-05-17 07:56:31 +10:00
Ryan Scott f62cc5b1ee Changed the object_count so that it only iterates over the RBasic object, not the full RVALUE known by the GC 2013-05-17 07:41:13 +10:00
Ryan Scott 222918deae First implementation of ObjectSpace moved outside of gc.c 2013-05-17 07:21:33 +10:00