On Tue, 20 May 2003 16:39:37 +0900, Mauricio FernŠŌdez wrote:

> On Tue, May 20, 2003 at 07:28:41AM +0900, Simon Strandgaard wrote:
>> > 
>> > Should extension writers overload new so that ruby_xmalloc/ALLOC 
>> > is being used ?   any benefits ?
>> > 
>> > Or should we just stick with new/delete ?

A)
> If you use ALLOC and the (de)allocation pattern of your extension will
> make Ruby GC work when it should (and regain some memory), use it.


B)
> If your (de)allocation pattern would trick the heuristics of the GC, and
> cause objects to be constantly marked without really freeing memory,
> then don't use it.


you recommend ruby-extensions-writers to use (A) over (B) whenever
possible. Am I understanding you correct ?


I wonder what it takes to fool the GC heuristics ?    
how would such senario look ? 




Thanks Mauricio :-)

--
Simon Strandgaard