var stats = Sys.getSystemStats();
Sys.println("Used: " + stats.usedMemory);
Sys.println("Free: " + stats.freeMemory);
Sys.println("_________________+ ");
Sys.println("Total: " + stats.totalMemory);
Result:
Used: 15946
Free: 41943040
_________________+
Total: 41943040
It doesn't add up and it doesn't make sense.
I'm creating a data field that needs to gather some history of the current activity and am really struggling to optimize usage of available memory. I'm afraid that if I hard code my array sizes, my field will break if a future CIQ release uses a little more memory (current version uses 9525 bytes for an empty SimpleDataField and 10299 bytes if you start the activity).