Patent ID: 8464349

Claim:
A method comprising: receiving a request from a thread of an untrusted application loaded into a sandbox to delete a block of code, wherein the block of code was previously inserted into a secured memory of the sandbox; determining whether the previously inserted block of code is located entirely within a dynamic text region of the secured memory, wherein the dynamic text region includes an integer number of fixed sized instruction bundles configured to receive one or more inserted blocks of code; and rejecting the request to delete the previously inserted block of code in response to determining that the block is not located entirely within the dynamic text region in response to determining that the previously inserted block of code is located entirely within the dynamic text region: determining whether the previously inserted block of code was inserted into the dynamic text region as a single unit; and in response to determining that the previously inserted block of code was inserted into the dynamic text region as a single unit: waiting for all threads of the sandboxed application to reach a secure execution point; deleting the previously inserted code; and signaling all threads of the sandboxed application that they may proceed from the secure execution point.