Patent ID: 7444484

Claim:
A method, in a data processing system, for determining heap memory utilization, comprising: detecting an event associated with objects in a heap; determining if the event is an object allocation event; in response to determining that the event is an object allocation event, determining an allocation count since a last mark-and-count operation; determining if the allocation count since a last mark-and-count operation is equal to or greater than a predetermined threshold; in response to determining that the allocation count since a last mark-and-count operation is equal to or greater than a predetermined threshold, performing a mark-and-count operation, wherein the mark-and-count operation is performed only when the allocation count since a last mark-and-count operation is equal to or greater than the predetermined threshold; and outputting information representative of the heap memory utilization based on data collected during the mark-and-count operation, wherein the mark-and-count operation includes: marking live objects in the heap in response to determining that the event is an object allocation event; and generating a live count based on the marking of live objects in the heap, wherein the live count is a count of a number of memory bytes allocated to live objects in the heap.