mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* regcomp.c (onig_region_memsize): implemented for memsize_of().
* ext/objspace/objspace.c (memsize_of): use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
15f26afdf0
commit
84dcc38273
5 changed files with 22 additions and 1 deletions
|
@ -17,6 +17,10 @@ class TestObjSpace < Test::Unit::TestCase
|
|||
f.close
|
||||
assert_kind_of(Integer, ObjectSpace.memsize_of(/a/.match("a")))
|
||||
assert_kind_of(Integer, ObjectSpace.memsize_of(Struct.new(:a)))
|
||||
|
||||
assert_operator(ObjectSpace.memsize_of(Regexp.new("(a)"*1000).match("a"*1000)),
|
||||
:>,
|
||||
ObjectSpace.memsize_of(//.match("")))
|
||||
end
|
||||
|
||||
def test_memsize_of_all
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue