Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ulimit strangeness



On Nov 13, 12:26pm, jarausch@xxxxxxxxxxxxxxxxxxx wrote:
} 
} even in zsh cvs from today I get the following strange behaviour:
} 
} ulimit -v $[200*1024]

Hmm:

zsh% ulimit -v $[200*1024]; limit
cputime         unlimited
filesize        unlimited
datasize        unlimited
stacksize       8MB
coredumpsize    unlimited
memoryuse       unlimited
maxproc         2040
descriptors     1024
memorylocked    unlimited
addressspace    200kB		<-- Note, not 200 megabytes!

(boom, zsh crashes)

On my machine zsh crashes instantly in tcgetattr() [a system library call]
while attempting to zwarn("fatal error: out of heap memory").  Just before
the ulimit call, `ps' shows `zsh -f' to be using 1900k+ of virtual memory,
so 200k is definitely not going to cut it.

Compare:

zsh% ulimit -s $[200*1024]; limit
cputime         unlimited
filesize        unlimited
datasize        unlimited
stacksize       200MB		<-- This one is correct
coredumpsize    unlimited
memoryuse       unlimited
maxproc         2040
descriptors     1024
memorylocked    unlimited
addressspace    unlimited

It looks like this has something to do with the convoluted #ifdef that
prevents duplicate case labels in rlimits.c when both RLIMIT_RSS and
RLIMIT_VMEM are defined, but I haven't yet figured out what to fix.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author