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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.13-1303-1373662441-310.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 444
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.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.13-1303-1373662441-310.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.13-1303-1373662441-310.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-24358-1460989490-196.86903-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 371
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.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-24358-1460989490-196.86903-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.13-1303-1373662441-310.0-0-0 [...] rt.cpan.org> <rt-4.0.18-24358-1460989490-196.86903-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-3317-1554967243-85.86903-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 21
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.