Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5056
Posted: 04:59pm 13 Apr 2025
Hi Mick,
Including a program into the library, something as large as the filemanager, may not be a good thing. Note that the filemanager then is part of your user program. All the memory it reserves (for all the filenames) become part of your programs heap. And to handle large (SD card) file systems, they reserve quite a lot of heap (59k of 100k on a VGA unit with twofingers KLINGON version of the filemanager).
The result will be that your user program can only be small (cannot use large arrays or lots of strings). Maybe sufficient for your fish tank controller, but that is it. And since it is in the library, that accounts for ALL program you want to run on that pico.
When it is in a flash slot, it is -either-or-. So it is a separate program, and yes, it uses a lot of heap, but when you close the fm, and start your own program all heap is yours.