I read about the following words in a paper of heap resizing in Poly/ML. But I didn't understand how exactly is the heap resized? Could anyone explain it in more detail?
At the end of every major GC(Garbage Collection), the adjustHeapSize() method is called. This method varies the heap size dynamically so there is a specific amount of free space available. That is to say, suppose the mature space contains l MB of live data immediately after a GC, then adjustHeapSize() varies the mature space size to K +l MB, where K is a precomputed constant amount. K is the value of the majorGCFree static variable in gc.cpp, which is set to the size of the mature space when the Poly/ML runtime commences execution.
I understand that there is a certain amount of free space available after each GC. But how to get the next calculated value for heap size? What is K and how is K computed? Why set it to K + l?