Patent ID: 8458702

Claim:
A method, comprising: receiving, by a virtual machine that is executable on a computing device, a prior-garbage-collection information request from an application program that is executable on the computing device, the prior-garbage-collection information request comprising a prior up-call, wherein the prior up-call comprises prior up-call code of the application program; receiving, by the virtual machine, a post-garbage-collection information request from the application program prior to execution of garbage collection software, the post-garbage-collection information request comprising a post up-call; determining, using the virtual machine, whether the garbage collection software is to be executed on the computing device; upon determining that the garbage collection software is to be executed, the virtual machine initiating execution of the prior up-call code of the application program in an address space of the application program; determining, using the virtual machine, whether the garbage collection software has completed execution on the computing device; and upon determining that the garbage collection software has completed execution, the virtual machine initiating execution of the post up-call for the application program; wherein the virtual machine initiating the execution of the prior up-call for the application program comprises: the application program executing the prior up-call; upon completion of the prior up-call, the application program sending an indication that the prior up-call has completed: the virtual machine receiving the indication that the prior up-call has completed; after receiving the indication that the prior up-call has completed, the virtual machine sending an virtual-machine indication that the prior up-call has completed to the garbage collection software; and after receiving the virtual-machine indication that the prior up-call has completed, executing the garbage collection software.