Daniel Berger
1/15/2008 3:08:00 AM
On Jan 14, 7:42 pm, "ara.t.howard" <ara.t.how...@gmail.com> wrote:
> why does this not blow up?
>
> cfp:~ > cat a.rb
> require 'yaml'
>
> factor = 100000000000000000
>
> soft, hard = Process.getrlimit Process::RLIMIT_RSS
> y 'soft' => soft, 'hard' => hard
>
> Process.setrlimit Process::RLIMIT_RSS, soft/factor, hard/factor
>
> soft, hard = Process.getrlimit Process::RLIMIT_RSS
> y 'soft' => soft, 'hard' => hard
>
> s = 42.chr * (soft + 1)
> s[-1]
>
> cfp:~ > sudo ruby a.rb; echo $?
> ---
> hard: 9223372036854775807
> soft: 9223372036854775807
> ---
> hard: 92
> soft: 92
> 0
>
> i sort of expect this to get signaled and throw an exception?
What platform?
Dan