Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: argv subscript range uses too many memory
- X-seq: zsh-users 17385
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-user <zsh-users@xxxxxxx>
- Subject: Re: argv subscript range uses too many memory
- Date: Thu, 08 Nov 2012 10:02:26 +0000
- In-reply-to: <20121108084001.GA7594@localhost.localdomain>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <20121108084001.GA7594@localhost.localdomain>
On Thu, 08 Nov 2012 16:40:01 +0800
Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author