From: Alexey Tourbin <at@altlinux.ru>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] Perl memory leaks?
Date: Mon, 3 Mar 2008 17:46:42 +0300
Message-ID: <20080303144642.GZ32305@solemn.turbinal> (raw)
In-Reply-To: <200803030004.00372.iadzhubey@rics.bwh.harvard.edu>
[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]
On Mon, Mar 03, 2008 at 12:04:00AM -0500, Ivan Adzhubey wrote:
> Никто не замечал утечек памяти в перле в последнее время? У меня падает скрипт
> с Cannot allocate memory, на операции открытия pipe:
>
> open(PIP, "gunzip -qc $file.gz |")
>
> Где-то после тысячи файлов в цикле. После прочтения каждого файла все
$ cd /usr/share/man/man1
$ ls *.gz |wc -l
1714
$ perl -e 'for $f (<*.gz>) { open P, "gunzip -qc $f |"; print while <P>; close P; }' |wc -c
8494614
$ zcat *.gz |wc -c
8494614
$
Может течь в разных местах, но здесь не похоже.
$ perl -e 'system "ps v $$"'
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
19284 pts/8 R+ 0:00 0 2 3681 1396 0.1 perl -e system "ps v $$"
$ perl -e 'for $f (<*.gz>) { open P, "gunzip -qc $f |"; 1 while <P>; close P; } system "ps v $$"'
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
19300 pts/8 R+ 0:00 0 2 3965 2172 0.2 perl -e for $f (<*.gz>) ...
$
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-03-03 14:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 5:04 Ivan Adzhubey
2008-03-03 6:58 ` Ivan Adzhubey
2008-03-03 14:46 ` Alexey Tourbin [this message]
2008-03-03 14:55 ` Alexey Tourbin
2008-03-03 15:20 ` Ivan Adzhubey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080303144642.GZ32305@solemn.turbinal \
--to=at@altlinux.ru \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git