Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maximum possible array length

Hello all,

 

in my clockface I'm developing right now I want to record about 330 integer values. I store them in an array and save the array in a cbor file to keep the values if the user starts other apps.

 

When I read the cbor file to reload the array during startup of the clockface I get the error

 

Fatal Jerryscript Error: ERR_OUT_OF_MEMORY

If I use (much) smaller arrays I don't get this error.

 

Is there a known maximum array length for the Fitbit devices?

 

In this case I use an Ionic.

 

Regards

Capitano

Best Answer
0 Votes
2 REPLIES 2

I think the JS Number type takes 8 bytes. Try using Int16Array or something like that. And I think there are significant overheads in JSON/CBOR as well; try binary file I/O.

Peter McLennan
Gondwana Software
Best Answer
Best Answer