sizeof
|
The sizeof function returns the closure size of the argument.
The closure size is defined as the number of bytes of uncompressed disk memory
required to store the original argument and any objects recursively referenced
(reachable) from the argument plus a record header.
Usage The sizeof function returns the disk file closure size of an object or immediate type.
Often it is necessary to know how much disk memory an object, together with all
of the objects reachable from it, will require. An example would be a Vector of 10
elements, where each item holds a different 100 byte long string object. The
length of this Vector will, of course, be 100; but, the sizeof the Vector
will exceed 1000 bytes. This is because, to store the Vector on disk, all of the
10 different string objects, reachable from the Vector, must be stored, and each
of these string objects is 100 bytes long. The closure size of the Vector would
grow if any of its elements were themselves Vectors containing other objects, etc. The sizeof function returns the disk file closure size of an object.
Often it is necessary to know how much disk memory an object, together with all
of the objects reachable from it, will require. An example would be a Matrix of 10
elements, where each item holds a different 100-byte long string object. The
length of this Matrix will, of course, be 100; but, the sizeof the Matrix will
exceed 1000 bytes. (There are 10 different String objects, each of which is 100 bytes
long). The closure size of the Matrix would grow if any of its elements were
themselves Matrices containing other objects, etc. The sizeof function returns the disk file closure size of an object.
Often it is necessary to know how much disk memory an object, together with all
of the objects reachable from it, will require. An example would be a Matrix of 10
elements, where each item holds a different 100-byte long string object. The
length of this Matrix will, of course, be 100; but, the sizeof the Matrix will
exceed 1000 bytes. (There are 10 different String objects, each of which is 100 bytes
long). The closure size of the Matrix would grow if any of its elements were
themselves Matrices containing other objects, etc.Matrix
NumMatrix
(sizeof obj ) Returns the closure size of an object
Expression:
Arguments
Name
Type
Description Argument: obj Character String Symbol Vector BitVector Brick ByteVector IntVector Boolean
ShortVector FltVector ObjVector Structure Dictionary Directory Pair List Void Date
ObjectRepository
Matrix NumMatrix Integer Float Number Complex Function
none
Returns:
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments.
Here are also a number of links to functions having arguments with any of these data types.
Analytic Information Server (AIS)AIS Component Systems
|