US 7,350,045 B2
Dynamic memory heap tagging
Michael Swafford, Bellevue, Wash. (US); and Kevin Charles Chase, Redmond, Wash. (US)
Assigned to Microsoft Corporation, Redmond, Wash. (US)
Filed on Dec. 31, 2003, as Appl. No. 10/749,938.
Prior Publication US 2005/0144410 A1, Jun. 30, 2005
Int. Cl. G06F 12/06 (2006.01)
U.S. Cl. 711—170  [707/205; 711/167; 711/172] 27 Claims
OG exemplary drawing
 
1. A system for tagging an allocable memory block, comprising:
a computer memory that comprises a heap in which allocable memory blocks can be allocated and freed;
a routine identifier that is arranged to determine the identity of a routine performing one of requesting the allocable memory block, requesting the size of the allocable memory block, and freeing the allocable memory block;
an identifier generator that is arranged to generate an identifier for the routine;
a diagnostic tagger that is arranged to store the identifier in the allocable memory block; and
a memory timestamp system that is arranged to store a timestamp within the allocable memory block, wherein the timestamp is configured to indicate a time when:
the requesting of the allocable memory block is performed unless the timestamp indicates a time when the allocable memory block is freed; and
the freeing of the allocable memory block is performed unless the timestamp indicates a time when the allocable memory block is requested,
such that, upon detection of a memory usage error involving the allocable memory block, the identifier for the routine and the timestamp provide information usable in determining whether if the routine is causing memory errors.