sizeof

 

 

Overview

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.

Matrix

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.

NumMatrix

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.

 

Syntax


Expression:

(sizeof obj )


Arguments Name Type Description
Argument:objCharacter 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:

Returns the closure size of an object



 

Examples

Here are a number of links to Lambda coding examples which contain this instruction in various use cases.

 

Argument Types

Here are the links to the data types of the function arguments.

Character String Symbol Vector
BitVector ByteVector IntVector VoidShortVector
FltVector ObjVector Structure Dictionary
Directory Brick Pair List
ObjectRepository Matrix NumMatrix Integer
Float Number Complex Boolean
Date Function

Here are also a number of links to functions having arguments with any of these data types.

++ += + /=
/ *= * --
-= - abortTransaction abs
acos add1 addMethod addi
appendWriteln append apply argument
arithmetic asin associate atan
attachLibrarian avg badd balance
bcompareEQ bcompareGE bcompareGT bcompareLE
bcompareLT bcompareNE bdiv beginTransaction
binaryInsert binaryNand binaryNor binaryNot
binaryNxor binarySearch bitToIntegerVector bitToNumberVector
bitwiseAnd bitwiseNand bitwiseNor bitwiseNot
bitwiseNxor bitwiseOr bitwiseShiftLeft bitwiseShiftRight
bitwiseXor bmod bmul boolean
c::r cadd callcc car
ccompareEQ ccompareGE ccompareGT ccompareLE
ccompareLT ccompareNE cdiv cdr
char character checkPointTransaction class
clean clear closeLog cmod
cmul code commitTransaction compareEQ
compareGE compareGT compareLE compareLT
compareNE compare comparison compile
complex compress conjugate cons
copy cos cosh count
csub date day days360
debugBrowsableProcs debugDetective debugEval debug
decode defchild defclass define(macro)
defineStructure define defmacro defmethod
deforphan defriend defstruct defun
deg deleteRows delete detachLibrarian
dimension disassemble display divi
downcase encode evalInSyncLocalContext eval
exit exp exportCsv exportSbf
exportTab expt fact fdisplay
fieldsOf fileClose fileCopy fileDir
fileDisplay fileEraseDir fileErase fileExists
fileMakeDir fileOpen fileReadAll fileReadRecord
fileRead fileResize fileSeek fileSizeOf
fileWriteAll fileWrite filewriteln findBlock
find floor fraction freeBlock
gc gcd getGlobalValue getRecursionCount
getSymbolTable getTickCount globalBinding hashString
hour iadd icompareEQ icompareGE
icompareGT icompareLE icompareLT icompareNE
idiv imaginary imod importCsv
importSbf importTab imul insertRows
insert inside inspect integer
isAtom isBitVector isBoolean isBound
isByteVector isCharAlphabetic isCharAlphanumeric isCharLowercase
isCharName isCharNumeric isCharUppercase isCharWhitespace
isChar isCharacter isClass isComplex
isDate isDictionary isDirectory isEqual
isError isEven isExact isFloatVector
isIdentical isImmediate isInexact isInside
isIntegerVector isInteger isLambda isMatrix
isMember isMoney isNegative isNull
isNumberMatrix isNumberVector isNumber isObjectVector
isObject isOdd isPair isPcodeVector
isPositive isString isStructure isSymbol
isText isTransaction isType isVector
isZero isub julian kurtosis
last lcm left length
lisp list loadModule loadObject
loadRepository loadWorkspace lock log10
log2 logConsole log logbase
macroReplace makeDictionary makeGaussianMatrix makeGramMatrix
makeQuotedList makeQuotedSymbol makeStructure map
mapc matrixGaussianEliminate matrixGaussianSubstitute max
median member methodsOf mid
min minute mod modi
money month morph muli
nadd ncompareEQ ncompareGE ncompareGT
ncompareLE ncompareLT ncompareNE ndiv
new nmod nmul now
nsub number objectToDictionary objectToDirectory
objectToList objectToMatrix objectToNumMatrix objectToNumVector
objectToStructure objectToVector offset onError
openLog pair parent parse
pi pointer preAllocateFixedMemoryBlocks product
proplist proprecord putprop qt
quit quote rad random
randomize range rank real
refAttributes refLibrarian refValues ref
remProp remove rename replace
rept reset resize reverse
right round run saveImmediate
saveModule saveObject saveRepository saveWorkspace
second send setAttributes setBlock
setCar setCdr setLastCdr set
setf setq sigmoid sign
sin sinh sizeof skew
sleep sort sql sqrt
srandom stdev stdevp stringCiEQ
stringCiGE stringCiGT stringCiLE stringCiLT
stringCiNE stringFill stringToBVector stringToVector
string sub1 subi submit
substitute substringCiEQ substringCiGE substringCiGT
substringCiLE substringCiLT substringCiNE substringEQ
substringFill substringGE substringGT substringLE
substringLT substringNE substring sum
sumsqr super svmRegression symbolToTypeCode
symbol systemCheck system tan
tanh text time today
trim type uncompress uniqueInsert
unlock upcase var varp
vectorBinaryInnerProduct vectorBipolarInnerProduct vectorCosineInnerProduct vectorCubeInnerProduct
vectorDelete vectorExpInnerProduct vectorFill vectorInnerProduct
vectorLogInnerProduct vectorQuartInnerProduct vectorQuintInnerProduct vectorSigmoidInnerProduct
vectorSineInnerProduct vectorSquareInnerProduct vectorTanInnerProduct vectorTanhInnerProduct
version writelg writeln year

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE