Patent ID: 7814290

Claim:
A method for synchronous detection and signaling of memory quota violations for sequential memory allocation in a shared heap, comprising: determining a conservative estimate of memory used by a task at a time the task is switched, wherein the conservative estimate is never less than actual memory usage, and wherein the operation of determining the conservative estimate of memory used is faster than the operation of reconciling the exact memory usage; detecting a potential quota violation if the conservative estimate of memory usage indicates that an attempt to allocate memory may violate the task's memory quota; reconciling an exact memory usage for the task if the potential quota violation is detected; determining a quota violation when the task's exact memory usage violates the task's memory quota; and signaling the quota violation synchronously at the time of violation; wherein the method provides accurate quota violation detection and signaling without reducing the performance of a critical path of sequential memory allocation; and wherein the method improves the accuracy of conservative estimate per-task memory usage tracking by reconciling exact memory usage when an estimate of the task's memory usage exceeds the task's memory quota.