Patent ID: 7461220

Claim:
A system for efficient thread-local heap replenishment, comprising: a heap manager for managing a heap comprising a plurality of thread-local heaps, a thread-local heap free list accessible to said plurality of thread-local heaps for replenishment without requiring a heap lock for exclusively locking said heap, and a plurality of subpool free lists accessible to said plurality of thread-local heaps for replenishment with said heap lock; means, responsive to a thread from among a plurality of threads accessing said heap receiving a thread-local heap allocation request wherein a current thread-local heap from among said plurality of thread-local heaps is unable to meet said allocation request and said allocation request is less than a maximum thread-local heap free size, for acquiring a share of a shared lock that postpones garbage collection within said heap without exclusively locking said heap; and means, responsive to locating a free item within said thread-local heap free list, for replenishing said current thread-local heap with said free item, such that said current thread-local heap is efficiently replenished without requiring the acquisition of said heap lock.