摘要 |
<p>Self-tuned detection of memory leaks or other resource leaks is described. Sample size and sample rate are set manually or computationally selected. Self-tuning leak detection code uses one or more self-tuning mechanisms to exclude outlier sample points, to perform a second order linear regression, and/or to identify a derivative of a sequence of linear regression slopes. Statistical analysis computationally proactively determines what trend is present: upward, steady, or downward. Analysis may compare a linear regression slope to a threshold at which the slope realizes an upward trend, possibly only after crossing the threshold a specified number of times. Regression calculation may be optimized by setting an origin to the median of the time values and setting a scale to their constant time interval. A watchdog may use self-tuned detection to monitor processes, for efficiently recycling processes to prevent problems caused by resource loss.</p> |