You must be logged in to reply.

Page 1 of 1 out of 7 messages.

App Available Memory Size Difference Between NETMF and TinyCLR OS

Posted 1yr ago
by B5 Fan | Junior | 704 exp
Posted 1yr ago
by B5 Fan | Junior | 704 exp
I'm using the Quail board (STM32F427) and with NETMF 4 my available memory after GC is 114,564. When I port TinyCLR OS onto it, my available memory after GC is 47,248. That is a significant difference. Any ideas on why? Thanks.
2 likes
Reply #1 — Posted 1yr ago
by Brett | Superhuman | 125,590 exp
Reply #1 — Posted 1yr ago
by Brett | Superhuman | 125,590 exp
TinyCLR OS is beta software, no optimisations. You've just got to handle things like this until it gets closer to release. If you need the memory, you need to go back to netmf
Reply #2 — Posted 1yr ago
by John_ghielectroncs | Employee
Reply #2 — Posted 1yr ago
by John_ghielectroncs | Employee
@B5 Fan - One other thing to keep in mind is that System.GC.GetTotalMemory returns the amount of memory used unlike the NETMF method that returned the amount free.
Reply #3 — Posted 1yr ago
by Gus_ghielectroncs | Employee
Reply #3 — Posted 1yr ago
by Gus_ghielectroncs | Employee
@B5 Fan - how did you measure the free memory? See John's reply please.
Reply #4 — Posted 1yr ago
by B5 Fan | Junior | 704 exp
Reply #4 — Posted 1yr ago
by B5 Fan | Junior | 704 exp
John_ghielectroncs says:
@B5 Fan - One other thing to keep in mind is that System.GC.GetTotalMemory returns the amount of memory used unlike the NETMF method that returned the amount free.

Is there a way to get the amount free? My app checks that if the amount of free space gets below a certain threshold it reboots the device.

Ummm, I suppose if I knew from the processor specs how much memory was available I could just do the simple subtraction. Reckon that would work?
Reply #5 — Posted 1yr ago
by John_ghielectroncs | Employee
Reply #5 — Posted 1yr ago
by John_ghielectroncs | Employee
@B5 Fan - There is currently no way to get the amount of heap space free unfortunately. We are looking into it for a future release. Doing the subtraction yourself would get you a rough number at least.
Reply #6 — Posted 1yr ago
by B5 Fan | Junior | 704 exp
Reply #6 — Posted 1yr ago
by B5 Fan | Junior | 704 exp
Ok, thanks. I'll hang tight until hopefully you can figure it out. Not a super high priority though.

Page 1 of 1 out of 7 messages.

You must be logged in to reply.