Patent ID: 8478738

Claim:
A computer implemented method of deallocating an object from a tenured space of a memory heap, the method comprising: collecting statistical trend information over a period of time for a plurality of objects and associated object references of a tenured space of a memory heap; analyzing the statistical trend information to learn a caching pattern from the statistical trend information, wherein learning the caching pattern includes: learning of a probable cache in the tenured space of the memory heap, learning that an object reference has been assigned to an object a number of times, learning how frequently an object reference is read, learning how frequently an object pointed to by an object reference is replaced, and learning a type of object that has been assigned a number of times; determining that a particular object of the plurality of objects of the tenured space of the memory heap is replaceable using the learned caching pattern; tagging an object reference pointing to the particular object as replaceable to indicate that the particular object is replaceable; decoding a command requesting an object allocation of the memory heap for a new object; and responding to the command by: determining that the object reference of the particular object was tagged as replaceable, wherein the object reference of the particular object was previously tagged as replaceable using the learned cache pattern; removing the particular object from the tenured space of the memory heap; and allocating the new object into a space within the tenured space of the memory heap from which the particular object was removed instead of a different space indicated by a freelist in response to determining that the new object can fit into the space.