Why Zerynth VM not using all available memory?

Hi

While I am trying to figure Zerynth VM memory consumption; I came across a discrepancy that I cannot explain. I hope you can help me here.
ST Nucleo F429ZI has 192 KB + 64Kb CCM of RAM. However, when I get the total memory from gc.info(), I get 134040!!!

This discrepancy is almost 40%. Where did it all go? How can I make the VM consume all of it! If not; where did it go and how to report on it?

Please note that when I click on device info icon (in the Zerynth Studio), 192k of RAM is reported; not 256Kb. Also I notice Particle Photon exhibited the same behavior but with 30% rather than 40%!
I hope you can help me; Zerynth is a memory huge and I hope we can use all of the available memory;

Many thanks in advance

S. Mansour

Hi abusous2000,

Your analysis is correct; the ST Nucleo F429ZI has 192 KB + 64KB CCM of RAM but the CCM RAM, unfortunately, cannot be managed by Python code due to the non-contiguous 64 KB.

You can use the CCM RAM from your custom C code by creating pointers allocated in that part of memory (you must always check the address you want to use and the size of the structure you have to allocate).

Regarding the 192 KB of contiguous RAM, Zerynth VM for ST Nucleo F429ZI requires approximately 40/45 KB of RAM (CDC Buffer, Serial Buffer, other OS basic structures, etc.).

So here is the explanation because you see 134040 of total memory available from gc.info().
If you need more, you can send us a support request using the “Contact Us” section of the website and telling us what you need for your application (if, for example, you don’t need the CDC driver you can save about 20/22 KB of RAM) so we can provide to you a lighter VM.

Hope this can help you

Matteo

1 Like

Hi,

Many thanks for the answer Matteo, I really appreciate it.

Before I use any new architecture; I try to find its limitations; its anomalies; this way I hedge my risks. So far I am just exploring, testing, investigating, …etc.

No questions about it that Zerynth is game changer. Few things are missing here and there (this is one of them), and it will be revolutionary in the IOT domain. More like Java in 1999.
To get it right is a difficult task; believe me I know.

I am new to Zerynth and to python; and so far it is looking good.
It may not be the answer to all projects; but for sure it is promising.

Many thx, and cheers,

S. Mansour

Thank you very much for your appreciation.

Many things will be upgraded in 2020 and many new features will be implemented to improve people’s approach to the IoT and IIoT world through the Zerynth ecosystem.

So, If you have any more questions, please feel free to contact us and stay tuned :slight_smile:

Matteo