Project

General

Profile

Bug #3377

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

Added by akr (Akira Tanaka) about 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
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

History

#1

Updated by authorNari (Narihiro Nakamura) about 9 years ago

  • Assignee set to authorNari (Narihiro Nakamura)
  • ruby -v set to ruby 1.9.3dev (2010-05-28 trunk 28053) [i686-linux]

=begin

=end

#2

Updated by Anonymous about 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r28185.
Akira, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF