Path: utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: memory leak Message-ID: <11423@jpl-devvax.JPL.NASA.GOV> Date: 13 Feb 91 18:05:22 GMT References: Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 20 In article serow@octavia.ibix.co.jp (Yoshitomo Tanaka) writes: : : In perl 3 patchlevel 44, : the following script causes memory leak. : : #! /usr/bin/perl : &xtest; system("ps v"); #eat memory : &xtest; system("ps v"); #eat more memory : &xtest; system("ps v"); #eat more and more memory : &xtest; system("ps v"); #eat more and more and more memory : &xtest; system("ps v"); #eat more ((and more) x 3) memory : sub xtest { : for ($i = 0; $i < 10000; $i++) { : $s = " " x ($i % 100); : } : } Oops, you're right. Forgot to free a temporary scalar. Fixed in 4.0. Thanks. Larry