Patent ID: 7302542

Claim:
A method of dynamically allocating a variable in a tracing framework, comprising: allocating dynamic memory in the tracing framework, having a plurality of data chunks; placing at least one of the plurality of data chunks onto a free list; encountering an enabled probe of an instrumented program; performing an action associated with the enabled probe, based on encountering the enabled probe; allocating the at least one of the plurality of data chunks on the free list to store the variable and removing the at least one of the plurality of data chunks from the free list, wherein the variable is associated with the action; deallocating the at least one of the plurality of data chunks and placing the at least one of the plurality of data chunks on a dirty list; and cleaning the at least one of the plurality of data chunks on the dirty list using a cleaning procedure to place the at least one of the plurality of data chunks on the free list, wherein the dynamic memory comprises first dynamic memory from a first processor and second dynamic memory from a second processor, and wherein the cleaning procedure comprises: moving one of the plurality of data chunks from the dirty list to a rinsing list if dirty list is not empty, issuing a first cross-call to the first processor and the second processor, moving one of the plurality of data chunks from the rinsing list to a clean list if the rinsing list is not empty upon receiving a response to the first cross-call, issuing a second cross-call to the first processor and the second processor, and setting a consumer dynamic memory state to clean in response to the second cross-call.