Another Arduino IDE 1 observation: (This is more noticeable when large projects are opened and closed.)
From my interpretation of what happens is that the memory that the IDE uses is not released in all circumstances.
I've watched the Win 10 Task Manager can see when CPU (Java) is loading a sketch. D: Disk is read for the source files.
I normally "Close" sketches. I just realized that Quit closes all open sketches. I believe "X" behaves even differently. (?)
(I did see a brief Arduino explanation of "Close" and "Quit" and it did not agree with what I witness.)
Memory % does increase with starting a sketch. Quit decreases Memory %.
I wanted to have documentation to prove my point by showing Ram use after opening and closing my biggest sketches.
I spent probably over an hour saving Ram use in the Task Manager and Resource Monitor (png files) but under arduino_debug
of course it does not happen.
Maybe because I did not actually modify any source code for this test. Come to think about it, I did no compiles, either. (?)
Actively editing and compiling these large sets of files in the last 2 or 3 days I have had to reboot my PC probably a couple dozen times.
Just to provide a reference, my present operational synth (to date) with 125 wavetables (281 files) build result:
FLASH: code:475064, data:4608196, headers:8548 free for files:3034656
RAM1: variables:186212, code:233048, padding:29096 free for local variables:75932
RAM2: variables:429312 free for malloc/new:94976
I made a new sketch, which simply prints the address of each wavetable in setup(). (loop() only blinks the LED.)
By commenting out a pointer (or groups of pointers) from the array and testing build results I found some suprises.
One wavetable .cpp file had an extreme size (ConcertBD). Other large wavetables were also eliminated.
I excluded some of the largest (cpp) wavetable files and their .h counterpart. The names excluded are:
ConcertBD, Dog, DoorCreaking, Door, FlKeyClick, Footsteps, GtCutNoise, GtFretNoise, GunShot,
HeartBeat, HorseGallop, Jetplane, Lasergun, Laughing, MachineGun, Punch, Scratch, Screaming,
SynMallet, SynStrings3, Telephone2, Thunder, Train, Wind, Woodblock
(I don't care for noise, anyway, and besides noise does not need to be tuned.)
BTW- Wavetable ConcertBD is so big that it (by itself) will not fit in the 8MB flash!
Other excluded wavetables would build ok, but there so big that only 4 or 5 of them can fit in 8MB of Flash at one time.
The 207 wavetable pointers to be printed in the this bareWT2 sketch now builds and loads:
FLASH: code:60624, data:7851652, headers:8360 free for files:205828
RAM1: variables:11264, code:57848, padding:7688 free for local variables:447488
RAM2: variables:12384 free for malloc/new:511904