Patent ID: 8166269

Claim:
A method of adaptively triggering garbage collection within a computer system, the method comprising: initializing a data structure to comprise N empty buckets (N>0), wherein each bucket represents an amount of free memory; periodically recording a rate of allocation of free memory; for each of multiple iterations of garbage collection: calculating a mean rate of allocation of free memory prior to the iteration; observing a drop in the free memory during the iteration; reading the data structure to examine a bucket corresponding to the observed memory drop; if the bucket is empty, storing in the bucket the calculated mean rate of allocation of free memory; and if the bucket stores a rate of allocation higher than the calculated mean rate of allocation of free memory, replacing the stored rate of allocation with a new rate of allocation; and if an increase in the rate of allocation of free memory is observed during said periodic recording, adjusting a free memory threshold at which the garbage collection is initiated.