Project

General

Profile

Actions

Bug #3377

closed

100000.times { Time.allocate }: [FATAL] failed to allocate memory

Added by akr (Akira Tanaka) almost 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-05-28 trunk 28053) [i686-linux]
Backport:
[ruby-dev:41499]

Description

=begin
以下のように
[FATAL] failed to allocate memory
というエラーが出ます。

% ./ruby -ve '100000.times { Time.allocate }'
ruby 1.9.3dev (2010-05-28 trunk 28053) [i686-linux]
[FATAL] failed to allocate memory

ここでは Time オブジェクトをたくさん生成していますが、
参照はすぐに消えるはずなので、GC されてメモリは
足りるはずではないでしょうか。

LazySweep が入る前の r28052 ではエラーにはなりませんでした。

% ./ruby -ve '100000.times { Time.allocate }'
ruby 1.9.3dev (2010-05-28 trunk 28052) [i686-linux]

[田中 哲][たなか あきら][Tanaka Akira]
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0