Use alloc/free provided by Ruby instead of standard library.