[MacRuby] #1319: MacRuby needs more memory than the file size even if gets only 1 byte from head of huge file.
MacRuby
ruby-noreply at macosforge.org
Mon Jun 6 13:34:09 PDT 2011
#1319: MacRuby needs more memory than the file size even if gets only 1 byte from
head of huge file.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Test Script:
{{{
#!ruby
def memory
pid = $$
str = `ps alx | grep '#{pid}.*ruby'`
str.split[7]
end
File.open(ARGV[0], "r") {|f|
f.getc
puts memory + " KB"
}
}}}
{{{
$ ruby -e 'str = "x" * 1024; 1024.times do; print str; end' > 1mb.txt
$ macruby test_io_getc.rb 1mb.txt
14928 KB
$ ruby -e 'str = "x" * 1024 * 100; 1024.times do; print str; end' >
100mb.txt
$ macruby test_io_getc.rb 100mb.txt
116484 KB
$ ruby -e 'str = "x" * 1024 * 500; 1024.times do; print str; end' >
500mb.txt
$ macruby test_io_getc.rb 500mb.txt
526076 KB
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1319>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list