From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-user <zsh-users@zsh.org>
Subject: Re: argv subscript range uses too many memory
Date: Thu, 08 Nov 2012 10:02:26 +0000 [thread overview]
Message-ID: <20121108100226.575b0788@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20121108084001.GA7594@localhost.localdomain>
On Thu, 08 Nov 2012 16:40:01 +0800
Han Pingtian <hanpt@linux.vnet.ibm.com> wrote:
> This script on my laptop uses so much memory so that being killed by
> oom-killer:
>
> arr=(~/**/*)
> set -- "${(@)arr}"
>
> while ((ARGC))
> do
> print -- "${argv[1,3]}"
> shift 3
> done
>
> But if change the subscript range to single array elements, it works
> just fine. So I suspect there is something wrong with the subscript
> range.
>
> Any thoughts?
I think you're right --- I think that was what was causing the memory
usage for zargs to go haywire for me last week. I couldn't see anything
obviously wrong when I looked, but it may be a pathology with the way
memory is allocated and freed.
pws
next prev parent reply other threads:[~2012-11-08 10:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 8:40 Han Pingtian
2012-11-08 10:02 ` Peter Stephenson [this message]
2012-11-10 10:58 ` Han Pingtian
2012-11-10 14:57 ` Bart Schaefer
2012-11-20 13:04 ` Han Pingtian
2012-11-20 17:03 ` Bart Schaefer
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=20121108100226.575b0788@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-users@zsh.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).