Is there any library function or other way for a VScode C program on a Pico to determine the RAM available to it? (other than attempting malloc()
) I've reviewed the API documentation in the SDK and didn't find anything.
Asked
Active
Viewed 1,406 times
3

tim11g
- 1,935
- 5
- 27
- 41
1 Answers
0
If there is not defined in SDK, you can calculate it manualy. The SRAM is 246 KB = 264 * 1024 * 8 bits(total logic memory). When you use malloc and free, use +/- a simple count and a getter function.

LordPaella
- 143
- 9
-
What about the stack? – incanus Mar 07 '23 at 01:52