[#5218] Ruby Book Eng tl, ch1 question — Jon Babcock <jon@...>

13 messages 2000/10/02

[#5404] Object.foo, setters and so on — "Hal E. Fulton" <hal9000@...>

OK, here is what I think I know.

14 messages 2000/10/11

[#5425] Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Jon Babcock <jon@...>

18 messages 2000/10/11
[#5427] RE: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — OZAWA -Crouton- Sakuro <crouton@...> 2000/10/11

At Thu, 12 Oct 2000 03:49:46 +0900,

[#5429] Re: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Jon Babcock <jon@...> 2000/10/11

Thanks for the input.

[#5432] Re: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Yasushi Shoji <yashi@...> 2000/10/11

At Thu, 12 Oct 2000 04:53:41 +0900,

[#5516] Re: Some newbye question — ts <decoux@...>

>>>>> "D" == Davide Marchignoli <marchign@di.unipi.it> writes:

80 messages 2000/10/13
[#5531] Re: Some newbye question — matz@... (Yukihiro Matsumoto) 2000/10/14

Hi,

[#5544] Re: Some newbye question — Davide Marchignoli <marchign@...> 2000/10/15

On Sat, 14 Oct 2000, Yukihiro Matsumoto wrote:

[#5576] Re: local variables (nested, in-block, parameters, etc.) — Dave Thomas <Dave@...> 2000/10/16

matz@zetabits.com (Yukihiro Matsumoto) writes:

[#5617] Re: local variables (nested, in-block, parameters, etc.) — "Brian F. Feldman" <green@...> 2000/10/16

Dave Thomas <Dave@thomases.com> wrote:

[#5705] Dynamic languages, SWOT ? — Hugh Sasse Staff Elec Eng <hgs@...>

There has been discussion on this list/group from time to time about

16 messages 2000/10/20
[#5712] Re: Dynamic languages, SWOT ? — Charles Hixson <charleshixsn@...> 2000/10/20

Hugh Sasse Staff Elec Eng wrote:

[#5882] [RFC] Towards a new synchronisation primitive — hipster <hipster@...4all.nl>

Hello fellow rubyists,

21 messages 2000/10/26

[ruby-talk:5572] Re: GC: malloc_memories

From: Mathieu Bouchard <matju@...>
Date: 2000-10-16 07:05:53 UTC
List: ruby-talk #5572
> |ok, malloc_memories is going to the trashcan. I'll put a counter that's
> |incremented in rb_newobj() and reset in rb_gc(). this should separate
> |completely two parts (?):

> I agree with throwing malloc_memories to the trashcan.  But I don't
> think rb_newobj() can collect appropriate information.  Only
> information it can know is number of object allocation, which is
> already detected by free list exhaustion.

Well, no, because free list exhaustion only says something about the total
number of cells, but I wish to count the number of _recently_ allocated
cells, that is, allocated since the last GC phase.

Isn't the rule that GC should be done either:

	1. when it *must* be done
	2. every once in a while

So, that counter of recently allocated cells takes care of case #2, just
like malloc_memories did.

> malloc_memories collect information about size of memory chunks
> referred from objects. 

It might be quite interesting to take into account memory chunks referred
from objects. However, unless we have a way to peek at realloc's size
difference (instead of only the new size) then realloc becomes slower than
usual, because of the GC, and this is not right.

It is true that if you are allocating bigger objects you may want to do GC
(much) more often, otherwise, big objects can exhaust memory very quickly
without the GC doing anything.

A solution is to make ruby_x*alloc perform pointer translations. we can
then insert a int-sized (or long-sized) header for the size of the
allocated chunk, so that we can retrieve that info for realloc accounting. 
This is, of course, regardless of any pre-existing accounting at the C
Library level, thanks to POSIX. :-/

What do you think? (I'm only getting used to playing with GC. never did
that before)

matju



In This Thread