Claims
- 1. A method of memory management comprising the steps of:
classifying data objects into at least a first type and alternatively a second type; and allocating a first portion of computer memory to data objects of the first type and a second portion of computer memory to data objects of the second type.
- 2. The method of claim 1, further comprising:
carrying out garbage collection of data objects within at least one portion of computer memory while retaining all surviving objects within the at least one portion of computer memory.
- 3. The method of claim 2, wherein objects of the first type occur in a computer memory with a frequency that exceeds a selected threshold, the first type being designated “prolific”, and wherein objects of the second type occur in the computer memory with a frequency that does not exceed the selected threshold, the second type being designated “non-prolific”.
- 4. A method comprising the steps of:
using a type profile to assign objects of a prolific type to a prolific space in memory and objects of a non-prolific type to a non-prolific space in memory; collecting space occupied by unreachable objects of prolific types in the prolific memory space when a first triggering event occurs; and collecting space occupied by unreachable objects in the memory when a second triggering event occurs.
- 5. The method of claim 4, wherein the first triggering event comprises a determination that an amount of free memory is less than a predetermined threshold.
- 6. The method of claim 4, wherein the second triggering event comprises a determination that an amount of free memory is less than a predetermined threshold.
- 7. The method of claim 4, further comprising the steps of:
creating the type profile by:
running a computer application; counting objects allocated in memory; calling popular types “prolific” and non-popular types “non-prolific”; and saving a type profile of the prolific and non-prolific types.
- 8. The method of claim 4, wherein the prolific types comprises a type in which a total amount of instances of the type exceeds a predetermined threshold with respect to a total number of objects created by the application.
- 9. The method of claim 4, wherein the prolific types comprises a top “k” popular types with respect to the total number of instances.
- 10. The method of claim 4, further comprising the steps of:
monitoring memory allocations while an application is running; and updating the type profile to reflect any changes in the memory allocations.
- 11. The method of claim 4, wherein the type profile is created by:
running a computer application; collecting space occupied by unreachable objects in the memory space; calling popular types “prolific” and non-popular types “non-prolific”; and saving a type profile of the prolific and non-prolific types.
- 12. The method of claim 4, wherein the collecting space occupied by unreachable objects of prolific types in the prolific memory space step further comprises eliminating scanning type information blocks.
- 13. The method of claim 4, further comprising
providing a list of references pointing to objects of prolific types.
- 14. The method of claim 4, wherein the prolific memory space is further divided into at least two sub-spaces according to increasing degrees of prolificacy of types.
- 15. The method of claim 4, wherein the non-prolific memory space is further divided to comprise a sub-space for objects of non-prolific types that cannot point to objects in the prolific space.
- 16. An apparatus comprising:
a data memory for storing a heap space divided into a prolific space and a nonprolific space.
- 17. The apparatus of claim 16, further comprising:
a program memory for storing a computer application; a memory allocator for assigning objects in memory to a prolific space or a non-prolific space, communicatively coupled to the program memory and to the data memory; and a type-based garbage collector, communicatively coupled to the program memory and to the data memory, for collecting space occupied by unreachable objects of prolific types in the prolific memory space when a first triggering event occurs, and collecting space occupied by unreachable objects in the entire memory when a second triggering event occurs.
- 18. The apparatus of claim 17, wherein the first triggering event comprises a determination that an amount of free memory is less than a predetermined threshold.
- 19. The apparatus of claim 17, wherein the second triggering event comprises a determination that an amount of free memory is less than a predetermined threshold.
- 20. The apparatus of claim 17, wherein the data memory further comprises a type profile.
- 21. The apparatus of claim 17, wherein the prolific space is further divided into at least two sub-spaces according to increasing degrees of prolificacy of types.
- 22. The apparatus of claim 17, wherein the non-prolific space is further divided to comprise a sub-space for objects of non-prolific types that cannot point to objects in the prolific space.
- 23. A computer readable medium, comprising computer instructions for:
classifying data objects into at least a first type and alternatively a second type; and allocating a first portion of computer memory to objects of the first type and a second portion of computer memory to objects of the second type.
- 24. The computer readable medium of claim 23, further comprising:
carrying out garbage collection of data objects within at least one portion of computer memory while retaining surviving objects within the at least one portion of computer memory.
- 25. The computer readable medium of claim 24, wherein objects of the first type are stored in a computer memory at a frequency that exceeds a selected threshold, the first type being designated “prolific”, and wherein objects of the second type are stored in the computer memory at a frequency that does not exceed the selected threshold, the second type being designated “non-prolific”.
- 26. A computer readable medium comprising instructions for performing the steps of:
using a type profile to assign objects of a prolific type to a prolific space in memory and objects of a non-prolific type to a non-prolific space in memory; collecting space occupied by unreachable objects of prolific types in the prolific memory space when a first triggering event occurs; and collecting space occupied by unreachable objects in the memory when a second triggering event occurs.
- 27. The computer readable medium of claim 26, wherein the first triggering event comprises a determination that an amount of free memory is less than a predetermined threshold.
- 28. The computer readable medium of claim 26, wherein the second triggering event comprises a determination that an amount of free memory is less than a predetermined threshold.
- 29. The computer readable medium of claim 26, further comprising instructions for: creating the type profile by:
running a computer application; counting objects allocated in memory; calling popular types “prolific” and non-popular types “non-prolific”; and saving a type profile of the prolific and non-prolific types.
- 30. The computer readable medium of claim 26, wherein the prolific types comprises a type in which a total amount of instances of the type exceeds a predetermined threshold with respect to a total number of objects created by the application.
- 31. The computer readable medium of claim 26, wherein the prolific types comprises a top “k” popular types with respect to the total number of instances.
- 32. The computer readable medium of claim 26, further comprising instructions for:
monitoring memory allocations while an application is running; and updating the type profile to reflect any changes in the memory allocations.
- 33. The computer readable medium of claim 26, wherein the type profile is created by:
running a computer application; collecting space occupied by unreachable objects in the memory space; calling popular types “prolific” and non-popular types “non-prolific”; and saving a type profile of the prolific and non-prolific types.
- 34. The computer readable medium of claim 26, wherein the collecting space occupied by unreachable objects of prolific types in the prolific memory space step further comprises eliminating scanning type information blocks.
- 35. The computer readable medium of claim 26, further comprising instructions for:
providing a list of references pointing to objects of prolific types.
- 36. The computer readable medium of claim 26, wherein the prolific memory space is further divided into at least two sub-spaces according to increasing degrees of prolificacy of types.
- 37. The computer readable medium of claim 26, wherein the non-prolific memory space is further divided to comprise a sub-space for objects of non-prolific types that cannot point to objects in the prolific space.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is based upon and claims priority from prior U.S. Provisional Patent Application No. 60/278,060, filed on Mar. 22, 2001, and further is based upon and claims priority from prior U.S. Provisional Patent Application No. 60/281,759, filed on Apr. 5, 2001, collectively the entire disclosure of which is herein incorporated by reference.
[0002] The present patent application is related to co-pending and commonly owned U.S. patent application No. XX/XXX,XXX, Attorney Docket No. YOR920010560US1, entitled “Method for Reducing Write Barrier Overhead”, filed on even date with the present patent application, the entire teachings of which being hereby incorporated by reference.
Provisional Applications (2)
|
Number |
Date |
Country |
|
60278060 |
Mar 2001 |
US |
|
60281759 |
Apr 2001 |
US |