Hello all,
I've been a fan of forth for a long time after using it at Rolm corporation for testing big PBX switches, at Sun where it was used as the bootloader for all their computers and at JPL where I used it for some testing on the Galileo spacecraft. Recently I have renewed my interest in forth but have found programming tedious as compared to modern computer languages. When I came upon pForth with named parameters and local variables it blew my mind and made forth programming fun again. Thanks for every ones hard work to make that happen.
Anyway. I'm finishing my port of pForth to an ESP32-wrover-kit and everything is working well. I have created a bunch of custom words dealing with SPI and other things so I decided to also create a word that would return the free heap size. What I noticed I cannot explain but I hope someone here can. When pForth starts up I see it call my AllocMem function three times
AllocMem: 44
AllocMem: 38684
AllocMem: 85568
I then call my free heap word and get a number. So far so good. I then compile a bunch of forth code which results in over 127 words added to the dictionary. The mystery is when I call my free heap word again it reports exactly the same heap free memory as it did before I compiled.
Are one of the above allocations creating a pool for new definitions ? If I compiled a lot more code would another large allocation occur for a new pool?
Thanks
Craig Lindley