--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
きくたにです。
立石さんの popmail.rb(さっき取ってきたのでたぶん最新)
を試しているのですが、
get 46 (local filename 46).
get 47 (local filename 47).
get 48 (local filename 48).
get 49 (local filename 49).
close socket.
./pop3-lib.rb:73:in +': failed to allocate memory (fatal)
from ./pop3-lib.rb:73:in gets2'
from ./pop3-lib.rb:171:in get_mail'
from popmail.rb:168
from popmail.rb:167:in each'
from popmail.rb:167
となってしまいます。該当スは
message essage + "\n" + line
というところです。50番目のメッセージは 1200行(80KB) くらいですが、
これで failed to allocate memory になるものでしょうか?
で、添付のようにmessageをarrayに換えてやってみたら、
ここは通りました。速くなった気もします。
But、POPのスプールにはテスト用に25000行(1.8MB)なんてメッセージも
あるんですが、さすがにでこけてしまいました。
ちょっと厳しすぎるテストかもしれませんが報告まで。
# ruby 1.1b9_16(98/04/28) [i586-linux]
--
人生を背負い投げ
菊谷 誠(Kikutani Makoto) kikutani / gol.com
kikutani / debian.or.jp (Linux関係のみ)
--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="pop3-lib.rb.pat"
--- pop3-lib.rb.orig Thu May 7 12:27:55 1998
+++ pop3-lib.rb Thu May 7 12:28:00 1998
@@ -63,14 +63,15 @@
if( line "." )
loop alse
else
- message ine
+ message ]
+ message << line
end
while( loop )
line ets
if( line "." )
loop alse
else
- message essage + "\n" + line
+ message << line
end
end
return message
@@ -145,13 +146,12 @@
ans ets
if( ok?(ans) )
if ( msg ets2 )
- msglist sg.split("\n")
- for line in msglist
+ msg.each{|line|
linelist ine.split(/ +/)
if( linelist[0] ! il )
maillist.push(linelist[0])
end
- end
+ }
end
else
maillist il
--6c2NcOVqGQ03X4Wi--