3

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.

tim11g
  • 1,935
  • 5
  • 27
  • 41

1 Answers1

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