APIdock / Ruby
/
method

realloc

ruby latest stable - Class: DL

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_1_10) is shown here.

realloc(p1, p2)
public

Change the size of the memory allocated at the memory location addr to size bytes. Returns the memory address of the reallocated memory, which may be different than the address passed in.

VALUE
rb_dl_realloc(VALUE self, VALUE addr, VALUE size)
{
 void *ptr = NUM2PTR(addr);
 ptr = (void*)ruby_xrealloc(ptr, NUM2INT(size));
 return PTR2NUM(ptr);
}

AltStyle によって変換されたページ (->オリジナル) /