Skip to content

__sizeof__

builtin · libnexusinterp/nexus-value/ov-proprietary.cc

: sz = __sizeof__ (val)

Return the amount of memory, in bytes, occupied by val.

The figure accounts for the stored data of val, so it grows with the number of elements and the width of the element type, and for a container such as a cell array it sums the storage of the contained values. Exactly one argument is required.