1. A method, comprising: generating a heap of objects during an execution of a script; tracing script objects included in an unexecuted portion of the script to a corresponding set of memory locations on the heap; marking at least a portion of the heap concurrently with the execution of the script, wherein a marked heap includes reachable objects reachable by the unexecuted portion of the script, and wherein the marked heap further includes unreachable objects unreachable by the unexecuted portion of the script; and freeing memory allocated to the unreachable objects, wherein the freeing is based on the marking and performed concurrently with the execution of the script.