Class: YTLJit::Runtime::GCCopy
Instance Method Summary collapse
- #gc ⇒ Object
-
#initialize ⇒ GCCopy
constructor
A new instance of GCCopy.
- #malloc(type) {|res| ... } ⇒ Object
Constructor Details
Instance Method Details
#gc ⇒ Object
20 21 |
# File 'lib/runtime/gc.rb', line 20 def gc end |
#malloc(type) {|res| ... } ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/runtime/gc.rb', line 23 def malloc(type) siz = type.size siz += YTLObject.size fromare = @arena[@from_arena] if fromare.size < fromare.using + siz then gc end res = TypedDataArena.new(YTLObject, fromare, fromare.using) fromare.using += siz # Initialize object header yield res res.cast(type) end |