Closed niv closed 10 years ago
The problem is that the V8 garbage collector is not running because you haven't trigger any of its threshholds. I believe it's around 1G before it will start collecting garbage.
try calling V8::C::IdleNotification()
You're right! Silly me. Thanks.
You can also set the the memory usage limits in the V8 vm with the ResourceConstraints
class which is undocumented. If I go over this with you, would you be interested in writing a guide for it in the wiki?
Hi,
I'm seeing some pretty high memory usage when eval()ing stuff inside a V8 context. Granted, the given usecase may be a bit extreme for most cases, but it would affect long-running processes pretty drastically I'd have to imagine.
Very simple example code:
You get the picture. I'd assume that a simple eval would not allocate resources and then not free them again. Running the garbage collector will not improve matters.
Is this the intended behaviour? Why is it behaving this way?