Should FEZ Mainboard have more Ram?

I’m exploring the FEZ Mainboard with SPWF04SA WiFi with an aplication writing sensor data to the Azure Storage Table service. I have the problem that I often get OutOfMemoryExceptions and must be very carful to minimize Ram usage. I wonder if the price difference of about 1 $ between the STM32F401 and STM32F411 is worth the limitations we have through the lesser amount of Ram.
As this question is theoretical at the moment, can anybody give some advice how to minimize Ram consumption.
Kind regards

We have been discussing this. As TinyCLR evolves, it may use more or less RAM. We should make this decision after we complete 2 major changes we are doing internally. There will be announcement around this.

1 Like

I think that more Ram would really be helpful.
I often see: Failed allocation for xx blocks, xxxx bytes
where sometimes the
command helps.
The OutOfMemoryException however seems to be the end.

I’m interested to hear if others have the same problem.

that “failed allocation” message in .NetMF at least just forced a GC to run, and then typically resulted in freeing up enough memory to continue - it’s not what I would term an OOM exception. Are you seeing those?

Hi Brett,
when e.g. the event:
Exception System.OutOfMemoryException - CLR_E_OUT_OF_MEMORY (6)
occurus it means that the Program stops.
When a message like:
Failed allocation for 108 blocks, 1728 bytes
occurs it seems that you program continues to work but you can’t be sure that all commands were executed as intended. E.g. that when you create a string from the content of a byte array you can’t be sure that the string really has the intended content.
However I’m not sure if my assumptions are correct. Perhaps GHI can give an explanation what such a message in detail means.

Not true. If your program continues then everything if working as expected. It failed to allocate, so it ran the garbage collector, and then it tried again and succeeded.

When it raises the exception and the program stops, you know it tried everything and still couldn’t find memory. But in this case your program will stop.

@Gus_Issa Thanks, good to know.

From my limited perspective more memory is always a good thing regardless of how large or small TinyCLR is, particularly if it only costs a buck. The G400 stands out from other low-ish power, non-Linux SOMs because of the massive amount of RAM and reasonable amount of flash. These resources allow me to write more functional, more robust code with less effort. I can maintain decent size IO buffers, very large asynchronous communication queues and all kinds of really useful stuff because of the extra memory. I can kind of understand why GHI may have chosen not to include external memory on the FEZ board but it makes it pretty much unusable for my work. Luckily, we’ve still got the G400.