Reference page says that "E.getSizeOf() returns the number of variable blocks used by the supplied variable".
But how should I estimate the real size of entities in my app? For example, E.getSizeOf(Number.MAX_VALUE) returns 1, meanwhile the bocksize is 14 (according to process.memory) and espruino numbers are 64bit. It just makes no sense for me.
Sorry for asking kind of stupid question, but I really want to figure out how to calculate size of objects as preciese as possible. Thanks for answer in advance!
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Reference page says that "E.getSizeOf() returns the number of variable blocks used by the supplied variable".
But how should I estimate the real size of entities in my app? For example, E.getSizeOf(Number.MAX_VALUE) returns 1, meanwhile the bocksize is 14 (according to process.memory) and espruino numbers are 64bit. It just makes no sense for me.
Sorry for asking kind of stupid question, but I really want to figure out how to calculate size of objects as preciese as possible. Thanks for answer in advance!