You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing a game development oriented mruby gem for small vectors (primarily 4x float). I need at most 16 bytes per object to store its data.
I can use mrb_data_type to store this data, and this works fine. However I would like to avoid the extra allocation and store this data along the object if possible. Can I do it somehow? Would I need a new MRB_TT_XXX to correctly garbage collect such object?
The text was updated successfully, but these errors were encountered:
Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms.
mruby-inline-struct gem is only provided for testing.
dabroz
added a commit
to dabroz/mruby
that referenced
this issue
Nov 16, 2016
Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms.
mruby-inline-struct gem is only provided for testing.
I am writing a game development oriented mruby gem for small vectors (primarily 4x float). I need at most 16 bytes per object to store its data.
I can use
mrb_data_type
to store this data, and this works fine. However I would like to avoid the extra allocation and store this data along the object if possible. Can I do it somehow? Would I need a newMRB_TT_XXX
to correctly garbage collect such object?The text was updated successfully, but these errors were encountered: