Patent ID: 7100015

Claim:
A method for redirecting external memory allocation operations, generated during calls by an application to external library functions, to an internal memory manager within the application, comprising: encountering a call to an external library function that performs a memory allocation operation during execution of the application; determining if the external library function can call to an internal memory allocation function within the application that allocates memory from a pool that is managed by the application, wherein determining if the external library function can call an internal memory allocation function involves reading a pre-determined indicator value, which indicates whether the external library function can call the internal memory allocation function, and wherein the method further comprises pre-determining a value for the pre-determined indicator value by examining the external library function to determine whether the external library function or a function called by the external library function will call a memory allocation function, and whether there are external references to external memory blocks allocated by the external library function; and if so, redirecting the call to the internal memory allocation function, and allocating the memory using the internal memory allocation function so that memory can be allocated from the pool that is managed by the application.