まつもと ゆきひろです

ruby-talkから持ってきました。

これって具体的にはなにが起きてますか?

In message "Re: [1.8] speed"
    on 02/12/29, nobu.nokada / softhome.net <nobu.nokada / softhome.net> writes:
|
|Hi,
|
|At Sun, 29 Dec 2002 17:59:43 +0900,
|ts wrote:
|>  yes. I've seen this big slowdown only with bz2 : libbzip2 internally use
|>  big buffers to decompress the data, with bz2 these buffers are managed by
|>  ruby (ruby_xmalloc). This means that each time I call ::new, the GC is
|>  called. 
|
|I guess this issue and [ruby-talk:59662] concern with following
|change.  GC only knows "big buffers" were allocated, but
|doesn't know whether they're refered by live objects, so the
|live memories amount would be estimated too small than the
|allocated.
|
|Fri Oct 11 00:24:57 2002  Nobuyoshi Nakada  <nobu.nokada / softhome.net>
|
|	* gc.c (ruby_xmalloc, ruby_xrealloc): restrict total allocation
|	  size according to memories consumed by live objects.
|	  [ruby-dev:18482]
|
|	* gc.c (gc_sweep): estimate how live objects consume memories.
|
|-- 
|Nobu Nakada