Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Fiddle.malloc
Fiddle.malloc(size)
ext/fiddle/fiddle.c
View on GitHub ↗
static VALUE
rb_fiddle_malloc(VALUE self, VALUE size)
{
void *ptr;
ptr = (void*)ruby_xcalloc(1, NUM2SIZET(size));
return PTR2NUM(ptr);
}
Allocate size bytes of memory and return the integer memory address for the allocated memory.