Claims
- 1. A method for storing short-lived objects defined within an object-oriented programming system in a virtual machine for executing platform-independent code, wherein short-lived objects are created during operation of the virtual machine, the method comprising;
allocating a storage area reserved for short-lived objects, wherein the storage area is subject to garbage collection using a first garbage collection method optimized for short-lived objects; receiving a request to create an object; determining if the object is identified in a table of short-lived objects; and if the object is identified as a short-lived object,
creating the short-lived object, and placing the short-lived object in the storage area.
- 2. The method of claim 1, wherein the storage area is an area of a heap used by the virtual machine.
- 3. The method of claim 2, wherein a remainder of the heap is subject to garbage collection using a second garbage collection method optimized for ordinary-lived objects.
- 4. The method of claim 1, wherein the short-lived object is a transient string buffer object.
- 5. The method of claim 4, wherein the transient string buffer object is a java.lang.StringBuffer object.
- 6. The method of claim 1, wherein the storage area is organized into an array of objects.
- 7. The method of claim 6, wherein an element of the array is sized to accommodate a largest short-lived object within the virtual machine.
- 8. The method of claim 1, wherein the virtual machine is a JAVA VIRTUAL MACHINE.
- 9. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for storing short-lived objects defined within an object-oriented programming system in a virtual machine for executing platform-independent code, wherein short-lived objects are created during operation of the virtual machine, the method comprising;
allocating a storage area reserved for short-lived objects, wherein the storage area is subject to garbage collection using a first garbage collection method optimized for short-lived objects; receiving a request to create an object; determining if the object is identified in a table of short-lived objects; and if the object is identified as a short-lived object,
creating the short-lived object, and placing the short-lived object in the storage area.
- 10. The computer-readable storage medium of claim 9, wherein the storage area is an area of a heap used by the virtual machine.
- 11. The computer-readable storage medium of claim 10, wherein a remainder of the heap is subject to garbage collection using a second garbage collection method optimized for ordinary-lived objects.
- 12. The computer-readable storage medium of claim 9, wherein the short-lived object is a transient string buffer object.
- 13. The computer-readable storage medium of claim 12, wherein the transient string buffer object is a java.lang.StringBuffer object.
- 14. The computer-readable storage medium of claim 9, wherein the storage area is organized into an array of objects.
- 15. The computer-readable storage medium of claim 14, wherein an element of the array is sized to accommodate a largest short-lived object within the virtual machine.
- 16. The computer-readable storage medium of claim 9, wherein the virtual machine is a JAVA VIRTUAL MACHINE.
- 17. An apparatus that facilitates storing short-lived objects defined within an object-oriented programming system in a virtual machine for executing platform-independent code, wherein short-lived objects are created during operation of the virtual machine, the apparatus comprising;
an allocating mechanism that is configured to allocate a storage area reserved for short-lived objects, wherein the storage area is subject to garbage collection using a first garbage collection method optimized for short-lived objects; a receiving mechanism that is configured to receive a request to create an object; a determining mechanism that is configured to determine if the object is identified in a table of short-lived objects; a creating mechanism that is configured to create a short-lived object; and a placing mechanism that is configured to place the short-lived object in the storage area.
- 18. The apparatus of claim 17, wherein the storage area is an area of a heap used by the virtual machine.
- 19. The apparatus of claim 18, wherein a remainder of the heap is subject to garbage collection using a second garbage collection method optimized for ordinary-lived objects.
- 20. The apparatus of claim 17, wherein the short-lived object is a transient string buffer object.
- 21. The apparatus of claim 20, wherein the transient string buffer object is a java.lang.StringBuffer object.
- 22. The apparatus of claim 17, wherein the storage area is organized into an array of objects.
- 23. The apparatus of claim 22, wherein an element of the array is sized to accommodate a largest short-lived object within the virtual machine.
- 24. The apparatus of claim 17, wherein the virtual machine is a JAVA VIRTUAL MACHINE.
RELATED APPLICATION
[0001] The subject matter of this application is related to the subject matter in a co-pending non-provisional application by the same inventors as the instant application and filed on the same day as the instant application entitled, “METHOD AND APPARATUS FOR STORING LONG-LIVED OBJECTS IN A VIRTUAL MACHINE,” having serial number TO BE ASSIGNED, and filing date TO BE ASSIGNED (Attorney Docket No. SUN-P5543-AES).