What values out of them would actually relate to my current RAM consumption? For example on Edge impulse i’m getting an estimate of 16KBs… so what values out of them would make something similar to this? or true values?
I know heap is related to the global values and stack to locals somehow… but i don’t know much!
I’m not using any custom code… i’m just trying it on audio classification example (not continuous).
I’m printing memory info before and after inference start… then before and after running classifier. The readings are constant around 43K for all the models… and at every point of code.
I’m assuming that’s just the heap assigned to the recorded raw samples…
The NN classifier frees all the heap once it classifies the sample. So i can’ t track it…
Only the tf arena size is arounfd 13 K according to the cpp file of trained model… (which is close to 16KB)
One other question… when a code uploads to arduino and it says for example…
Global variables use 39% of the dynamic memory… does it also have the tensor arena in it already? or is it assigned only when running classifier?
@rida What do you mean when referring to the tensor arena? if you are referring to the model, then it is part of the binary you are flashing to the device.
Also global variables are usually stored in the data section. Heap is only a temporary data structure you get when you request a specific size of the memory.
If you are referring to the sensor data, then the feature array should be allocated from the heap when the data is read from the sensor.
If you are interested we provide the firmware as open source please have a look here: