System.freeMemory()
returns the highwater mark of the heap in relation to the bottom of the stack - it’s the minimum amount of free memory guaranteed to be available - not necessary the actual amount. Once blocks of memory are freed, the high water mark does not move downwards.
1 Like