Claims
- 1. A method for managing surplus memory in a multitasking system, comprising:
reserving a guaranteed amount of memory for a task from a heap in the multitasking system; receiving a request from the task to allocate memory for a new object; and if memory is available in the guaranteed amount of memory for the task,
allocating memory for the new object from the guaranteed amount of memory; otherwise, if surplus memory is available in the heap in addition to memory allocated to tasks,
reserving an additional amount of memory to the task from the heap, and allocating memory for the new object from the additional amount of memory, whereby allocating memory for the new object from the additional amount of memory delays garbage collection.
- 2. The method of claim 1, wherein if surplus memory is not available in the heap in addition to memory allocated to tasks, the method further comprises
performing garbage collection on memory to reclaim unused reserved memory, and allocating memory for the new object from reclaimed surplus memory.
- 3. The method of claim 1, wherein reserving the guaranteed amount of memory from the heap includes:
determining if there is sufficient memory available in the heap; and if not, performing garbage collection to reclaim allocated surplus memory, and reserving memory for the task from reclaimed memory.
- 4. The method of claim 1, wherein memory in the heap is managed using a generational garbage collector.
- 5. The method of claim 4, wherein a plurality of tasks share an old generation of the generational garbage collector.
- 6. The method of claim 5, wherein each task of the plurality of tasks has a new generation of the generational garbage collector belonging to the task.
- 7. The method of claim 4, wherein the generational garbage collector is a copying garbage collector.
- 8. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for managing surplus memory in a multitasking system, the method comprising:
reserving a guaranteed amount of memory for a task from a heap in the multitasking system; receiving a request from the task to allocate memory for a new object; and if memory is available in the guaranteed amount of memory for the task,
allocating memory for the new object from the guaranteed amount of memory; otherwise, if surplus memory is available in the heap in addition to memory allocated to tasks,
reserving an additional amount of memory to the task from the heap, and allocating memory for the new object from the additional amount of memory, whereby allocating memory for the new object from the additional amount of memory delays garbage collection.
- 9. The computer-readable storage medium of claim 8, wherein if surplus memory is not available in the heap in addition to memory allocated to tasks, the method further comprises:
performing garbage collection on memory to reclaim unused reserved memory, and allocating memory for the new object from reclaimed surplus memory.
- 10. The computer-readable storage medium of claim 8, wherein reserving the guaranteed amount of memory from the heap includes:
determining if there is sufficient memory available in the heap; and if not, performing garbage collection to reclaim allocated surplus memory, and reserving memory for the task from reclaimed memory.
- 11. The computer-readable storage medium of claim 8, wherein memory in the heap is managed using a generational garbage collector.
- 12. The computer-readable storage medium of claim 11, wherein a plurality of tasks share an old generation of the generational garbage collector.
- 13. The computer-readable storage medium of claim 12, wherein each task of the plurality of tasks has a new generation of the generational garbage collector belonging to the task.
- 14. The computer-readable storage medium of claim 11, wherein the generational garbage collector is a copying garbage collector.
- 15. An apparatus that facilitates managing surplus memory in a multitasking system, comprising:
a reserving mechanism that is configured to reserve a guaranteed amount of memory for a task from a heap in the multitasking system; a receiving mechanism that is configured to receive a request from the task to allocate memory for a new object; the reserving mechanism that is further configured to reserve an additional amount of memory to the task from the heap; and an allocating mechanism that is configured to allocate memory for the new object from the guaranteed amount of memory.
- 16. The apparatus of claim 15, further comprising:
a garbage collecting mechanism that is configured to perform a garbage collection on memory to reclaim unused reserved memory, and the allocating mechanism that is further configured to allocate memory for the new object from reclaimed memory
- 17. The apparatus of claim 15, further comprising:
a determining mechanism that is configured to determine if there is sufficient memory available in the heap; and a garbage collection mechanism that is configured to perform a garbage collection to reclaim allocated surplus memory, and the reserving mechanism that is further configured to reserve memory for the task from reclaimed memory.
- 18. The apparatus of claim 15, further comprising a generational garbage collector.
- 19. The apparatus of claim 18, wherein a plurality of tasks share an old generation of the generational garbage collector.
- 20. The apparatus of claim 19, wherein each task of the plurality of tasks has a new generation of the generational garbage collector belonging to the task.
- 21. The apparatus of claim 18, wherein the generational garbage collector is a copying garbage collector.
RELATED APPLICATION
[0001] This application hereby claims priority under 35 U.S.C. §119 to a Provisional Patent Application entitled, “The Design of MVM—a Multitasking Virtual Machine,” filed Mar. 15, 2001 by inventors Grzegorz J. Czajkowski and Laurent P. Daynes (Application No. 60/276,049).
Provisional Applications (1)
|
Number |
Date |
Country |
|
60276409 |
Mar 2001 |
US |