Hi,
In message "Re: C extension: "malloc" and "rb_raise""
on Sun, 25 Oct 2009 02:06:42 +0900, Tim Hunter <TimHunter / nc.rr.com> writes:
|Also check out Ruby's xmalloc and xfree. These functions act
|like malloc and free but the memory will be garbage collected when Ruby
|determines that there are no more references to it.
Unfortunately, regions allocated by xmalloc() will not be garbage
collected. You still need to deallocate them by xfree(). The
difference is that garbage collector will be kicked when a) underlying
malloc() failed, b) certain amount of memory region is allocated, to
make more free space.
matz.