mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
put locking in place when running memspec
This commit is contained in:
parent
bcabe39866
commit
4a977ac1ee
1 changed files with 7 additions and 5 deletions
|
@ -24,11 +24,13 @@ describe "A Very blunt test to make sure that we aren't doing stupid leaks" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "can eval simple value passing statements repeatedly without significantly increasing memory" do
|
it "can eval simple value passing statements repeatedly without significantly increasing memory" do
|
||||||
|
V8::C::Locker() do
|
||||||
cxt = V8::Context.new
|
cxt = V8::Context.new
|
||||||
500.times do
|
500.times do
|
||||||
cxt.eval('7 * 6')
|
cxt.eval('7 * 6')
|
||||||
run_v8_gc
|
run_v8_gc
|
||||||
end
|
end
|
||||||
|
end
|
||||||
process_memory.should <= @start_memory * 1.1
|
process_memory.should <= @start_memory * 1.1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue