Skip Menu |
 

This queue is for tickets about the JavaScript-V8 CPAN distribution.

Report information
The Basics
Id: 86903
Status: resolved
Priority: 0/
Queue: JavaScript-V8

People
Owner: Nobody in particular
Requestors: alankila [...] bel.fi
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Memory leak in V8Context: make_function and string_wrap unreleased
Download (untitled) / with headers
text/plain 444b
Adding these two lines to ~V8Context: make_function.Dispose(); string_wrap.Dispose(); seems to keep memory usage stable under this kind of testing loop: for (1 .. 10000) { my $v8 = JavaScript::V8::Context->new(); print grep /VmRSS/, `cat /proc/$$/status`; } testing code is obviously Linux only. Without this change, every V8Context leaks about 100 kB, and the total lossage will be around 1 GB, so the signal is clear enough.
Download (untitled) / with headers
text/plain 371b
On Fri Jul 12 16:54:01 2013, https://www.google.com/accounts/o8/id?id=AItOawkV9zn3etOeQMR64RITNw0pAvM0EFPVPqU wrote: Show quoted text
> Adding these two lines to ~V8Context: > > make_function.Dispose(); > string_wrap.Dispose(); > > seems to keep memory usage stable under this kind of testing loop:
I concur, this seems to fix the problem with slowdowns and huge memory usage in loops.
Incorporated, thanks!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.