William Djaja Tjokroaminata (billtj / y.glue.umd.edu) wrote:
>  Reimer Behrends <behrends / cse.msu.edu> wrote:
[Loading 1 MB images via malloc.]
>  The 1 GB memory is a valid memory, isn't it?  So we should not have a
>  problem with it, unless, of course, our computer does not have that much
>  of memory.  I just doubt your last sentence above, "even though there is
>  plenty of garbage to collect".  With GC_MALLOC_LIMIT of 8000000 bytes,
>  isn't that the maximum garbage to collect is 8 megabytes?

No, 99.8% of the allocated memory is garbage, since at most 2 out of the
1000 images are accessible at any time. Ruby only counts memory
allocated via ALLOC(). It does not even know about malloc(), so its
internal counter will not be affected by malloc() calls and still be at
a few K at best (for the ruby objects you have).

That's why the GC heuristic won't be worth much if you use malloc()
predominantly.

[...]

			Reimer Behrends