Patent ID: 7685588

Claim:
A method of binary instrumentation comprising: using a processor, coupled to a memory, to allocate a contiguous memory region included in the memory, wherein a total number of original functions to be intercepted is unknown at the time of the allocation; filling the memory region with (A) first and second platform independent high level non-assembly language copies of an interceptor function (B) but not any version of the original functions; initializing a first data structure with at least a starting address, length of the allocated memory region, and a reference to a second data structure; storing an address of one of the original functions to be intercepted in a current element of the second data structure upon request for instrumentation; and providing a starting address of the second copy of the interceptor function upon request for instrumentation; wherein instructions for allocating the memory region, filling the memory region, and initializing the first data structure are executed upon initial request for instrumentation so that each time an additional original function needs to be intercepted a new copy of the interceptor function is associated with the additional original function.