Avoiding or deferring data copies
AssigneeAmazon Technologies, Inc.
InventorJeremy Boynes
Life of this patent
Estimating the term…
Abstract
Methods and systems for avoiding or deferring data copies are disclosed. Using a virtual machine, it is determined whether a set of program code comprises references to a data object after an operation to generate a copy of the data object. If not, a set of optimized program code is generated in which the operation to copy the data object is replaced with an operation to update a reference. Using the virtual machine, it is determined whether the set of program code comprises an operation to generate a copy of a buffer object. If so, a set of further optimized program code is generated, comprising an allocation of one or more memory pages to store the buffer object with a copy-on-write parameter instead of the operation to generate the copy of the buffer object.
Claims20
A method, comprising:
- performing by one or more hardware computing devices:
- determining that a set of program code does not comprise one or more references to an object after an operation to generate a copy of the object, wherein the set of program code is executable using a virtual machine;
- and
- in response to determining that the set of program code does not comprise the one or more references to the object after the operation to generate the copy of the object, generating a set of optimized program code, executable using a virtual machine, comprising replacing the operation to generate the copy of the object in the set of program code with an operation to update a pointer in the set of optimized program code such that the optimized program code will not perform the operation to generate the copy of the object.
A non-transitory computer-readable storage medium storing program instructions computer-executable to perform:
- determining that a set of program code does not comprise one or more references to an object after an operation to generate a copy of the object, wherein the set of program code is executable using a virtual machine;
- and
- generating a set of optimized program code, executable using a virtual machine, comprising replacing the operation to generate the copy of the object in the set of program code with an operation to update a reference in the set of optimized program code such that the optimized program code will not perform the operation to generate the copy of the object.
A method, comprising:
- performing by one or more hardware computing devices:
- determining that a set of program code comprises an operation to generate a copy of an object into which data is accumulated, wherein the set of program code is executable using a virtual machine;
- and
- in response to determining that the set of program code comprises the operation to generate the copy of the object into which data is accumulated, generating a set of optimized program code, wherein the set of optimized program code comprises an allocation of one or more memory pages to store the object with a copy-on-write parameter instead of the operation to generate the copy of the object.
Dependencies are inferred from the claim text.