Patent ID: 7296130

Claim:
A method in a data processing system for generating coverage data for accesses to dynamically allocated data during execution of code in a data processing system, the method comprising: responsive to a request to dynamically allocate a memory area for dynamically allocated data during runtime when an allocation of memory is required, dynamically allocating the memory area; responsive to dynamically allocating the memory area, associating the memory area with a data access indicator; responsive to executing an instruction in the code at a processor in the data processing system, determining whether an access to a memory location associated with the data access indicator has occurred; and if the data access indicator is associated with the memory area, changing a state of the data access indicator by the processor when the instruction is executed, wherein the coverage data for the dynamically allocated data is generated during execution of the code by the processor, wherein the memory area comprises a starting memory location and an ending memory location in which the starting memory location and the ending memory location span a size of memory equal to the request, and a subsequent memory location located one byte after the ending memory location, wherein the data access indicator comprises a first data access indicator in a set of data access indicators associated with the memory area, and wherein the first data access indicator identifies the starting memory location, and wherein the associating step further comprises: associating a second data access indicator in the set of data access indicators with the ending memory location, wherein the second data access indicator identifies the ending memory location in the memory area; and associating a third data access indicator in the set of data access indicators with the subsequent memory location, wherein the third data access indicator identifies the subsequent memory location, wherein an access to the one byte after the ending memory location indicates that a memory size of the memory area is insufficient.