A method, apparatus, and computer instructions for generating coverage
data for accesses to dynamically allocated data during execution of code
in a data processing system. In response to a request to dynamically
allocate a memory area for dynamically allocated data, the memory area is
dynamically allocated during execution of the code. The memory area is
associated with a data access indicator in response to dynamically
allocating this memory area. A determination is made as to whether an
access to a memory location associated with the data access indicator has
occurred, in response to executing an instruction in the code at a
processor in the data processing system. If the data access indicator is
associated with the memory area, a state of the data access indicator by
the processor is changed when the instruction is executed. The coverage
data for the dynamically allocated data is generated during execution of
the code by the processor.