develooper Front page | perl.perl5.porters | Postings from April 2014

[perl #121676] Memory leak in backticks and system

Thread Next
From:
bulk88 via RT
Date:
April 22, 2014 11:41
Subject:
[perl #121676] Memory leak in backticks and system
Message ID:
rt-4.0.18-23072-1398166860-1463.121676-15-0@perl.org
On Mon Apr 21 23:33:16 2014, tonyc wrote:
> I tried to fudge the build (and added some extra code) to build perl
> with MSVCRT's debug version memory leak reporting[1], which reported
> only a single leak, which appears with perl -e0 or perl -e "`dir` for
> 1..100`".
> 

I've never used debugging CRT with Perl. Its on my very long todo list. Since you got it to compile, may I suggest you implement the feature in the makefiles?

I've always thought that PERL_DESTRUT_LEVEL and debugging CRT would conflict since perl doesn't free all memory on normal exists unless psuedo-fork has been called which sets PERL_DESTRUCT_LEVEL.


> I don't see a leak if I build perl with PERL_MALLOC defined (which
> requires disabling USE_IMP_SYS).
> 
> I don't see a leak with all of PERL_MALLOC, USE_MULTI, USE_ITHREADS,
> USE_IMP_SYS undefined.
> 
> No leak with just USE_MULTI re-enabled out of those.
> 
> Right now I suspect something in the USE_IMP_SYS layer.
> 

Did you see the leak in any config? I saw some strange reproducibility which had no identifyable pattern, since it wasn't tied to CRT dll or compiler, in http://www.nntp.perl.org/group/perl.perl5.porters/2014/04/msg214405.html . The leak can be clearly seen in Task Manager. Its about 200-300 KB a second/a screen refresh in task manager.


-- 
bulk88 ~ bulk88 at hotmail.com

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121676

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About