New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible memory leak in embedded Perl #954
Comments
From mattgill@nortelnetworks.comDear bug fixers, I am using a Perl interpreter embedded in C/C++. The following #include <stdio.h> static PerlInterpreter *my_perl; int main (int argc, char** argv, char** env) { /* Continuously create an interpreter, then parse file, for (j = 0; j < 10000; j++) { return 0; The Perl code is as follows: #! /usr/bin/perl -w sub func2 { The output of perlbug -d, on my Windows machine, is as follows: Site configuration information for perl 5.00503: Summary of my perl5 (5.0 patchlevel 5 subversion 03) configuration: Locally applied patches: --- --- (I've left out the PATH) Yours Sincerely Matthew Gillman Matthew Gillman DIRECT - This message may contain information proprietary to Nortel Networks so any |
From [Unknown Contact. See original ticket]This looks similar to 19991217.006. -spp ------- Forwarded Message From: "Matthew Gillman" <mattgill@nortelnetworks.com> I don't know for 100% definite, but I'm fairly sure that this is still an Moreover, in recent months I made a posting on the Perl 6 RFC site, saying So - looks like it's still open at the moment, I'm afraid - although as I Hope this helps. Matthew
------- End of Forwarded Message |
From @steve-m-hayThis ancient bug report is still valid, and actually seems to be worse The memory leak seems to be caused by perl_construct() and/or #include <EXTERN.h> static PerlInterpreter *my_perl; int main (int argc, char** argv, char** env) { for (i = 0; i < 10000; i++) { return 0; Simply removing the perl_construct()/perl_destruct() calls plugs the leak. Can this be reproduced on other OS's besides Win32? Here's my "perl -V": Summary of my perl5 (revision 5 version 8 subversion 5) configuration: Characteristics of this binary (from libperl): |
From nick@ing-simmons.netSteve Hay via RT <bugs-perl5@bugs6.perl.org> writes:
Any that don't have MULTIPLICITY defined. If you want perl_destruct to clean up you need to set PL_perl_destruct_level = 1; (But MULTIPLICITY does that.) The boiler plate should probably include PL_exit_flags |= PERL_EXIT_DESTRUCT_END; as well.
|
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#1901 (status was 'resolved')
Searchable as RT1901$
The text was updated successfully, but these errors were encountered: