Ruby 1.9.2 リファレンスマニュアル > ライブラリ一覧 > objspaceライブラリ > ObjectSpaceモジュール > memsize_of
memsize_of(obj) -> Integer
[added by objspace]
Return consuming memory size of obj.
Note that this information is incomplete. You need to deal with this information as only a *HINT*. Especaially, the size of T_DATA may not right size.
This method is not expected to work except C Ruby.