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

[perl #121676] Memory leak in backticks and system

Thread Next
bulk88 via RT
April 22, 2014 11:41
[perl #121676] Memory leak in backticks and system
Message ID:
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 . 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

via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About