Tips to reduce RAM usage in RAM-constrained projects?

Looking for ideas on how to reduce the RAM memory usage of a project.
What things are worth looking at first?

Thanks!

Heap or stack or both?

I might start with looking at what is being allocated, sparse use of arrays, oversized variable type for the data, etc. Packing data as bits rather than bool, etc. Refactoring.

For Stack, you can try reducing the allowance but need to be careful the application does not run out of stack.

Use retained memory as RAM - Photon that's an option.

1 Like

Here is something in the docs. It covers both code and RAM optimization tips.

2 Likes

@armor @peekay123 thank you both.
I'm going to go through your suggestions and reading material to see what I find, thanks again!