Patent ID: 7243342

Claim:
An apparatus structured to determine if a user-defined software function is a memory allocation function, the apparatus comprising: a use-def chain constructor structured to construct a plurality of use-def chains for the user-defined software function; a path tracer structured to trace a path of a return statement within the user-defined function using at least one of the use-def chains; and a controller operatively coupled to the use-def chain constructor and the path tracer, the controller being structured to: denote during a compile-time that the user-defined software function is a non-memory allocation function if a path of the return statement does not terminate at a call to a known memory allocation function on a right hand side of an assignment operator; trace at least one use-def chain of a variable on a left hand side of the assignment operator if the path of the return statement does terminate at the call to the known memory allocation function on the right hand side of the assignment operator; and denote during the compile-time that the user-defined software function is a non-memory allocation function if a variable on a left hand side of the assignment operator is available outside a scope of the user-defined function.