US9804962B2ActiveUtilityA1
Garbage collection control in managed code
Assignee: MICROSOFT TECHNOLOGY LICENSING LLCPriority: Feb 13, 2015Filed: Feb 13, 2015Granted: Oct 31, 2017
Est. expiryFeb 13, 2035(~8.6 yrs left)· nominal 20-yr term from priority
G06F 12/0269G06F 2212/702G06F 12/0261
64
PatentIndex Score
1
Cited by
26
References
20
Claims
Abstract
Controlling garbage collection operations. The method includes setting up garbage collection to collect objects that are no longer in use in a managed code environment. The method further includes receiving managed code input specifying a desired quantum within which it is desired that garbage collection not be performed. The method further includes performing a computing operation to determine the desired quantum can likely be met. The method further includes running memory operations within the quantum without running the initialized garbage collection.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. In a managed code computing environment which implements garbage collection, a system for controlling garbage collection operations, the system comprising:
one or more processors; and
one or more computer-readable media, wherein the one or more computer-readable media comprise computer-executable instructions that when executed by at least one of the one or more processors cause the system to perform the following:
initializing garbage collection to collect objects that are no longer in use for a particular managed code in a managed code environment;
receiving managed code including receiving managed code input specifying a desired quantum within which it is desired that no garbage collection will be performed in order to at least increase the performance of the managed code within the desired quantum;
performing a computing operation to determine the desired quantum can likely be met, the computing operation including at least evaluating an anticipated resource usage rate of the managed code within the desired quantum; and
based at least on determining the desired quantum can be met, running memory operations within the quantum without running the initialized garbage collection.
2. The system of claim 1 , wherein the computing operation to determine the desired quantum can likely be met comprises disabling the initialization of garbage collection.
3. The system of claim 1 , wherein the one or more computer-readable media comprise computer-executable instructions that when executed by at least one of the one or more processors cause the system to perform the following:
receiving input specifying that garbage collection can run, and as a result performing garbage collection operations per the initialized garbage collection.
4. The system of claim 1 , wherein the operation to determine the desired quantum can likely be met comprises performing heuristic analysis on a memory to determine based on past operations on the memory for the particular managed code that the desired quantum can likely be met.
5. The system of claim 1 , wherein the operation to determine the desired quantum can likely be met comprises committing one or more memory regions, for later object allocation, to meet the desired quantum.
6. The system of claim 1 , wherein the input specifies a memory size to commit.
7. The system of claim 6 , wherein the system is a system where objects are separated based on their sizes where larger objects are handled in their own heap, and wherein the one or more computer-readable media comprise computer-executable instructions that when executed by at least one of the one or more processors cause the system to perform the following:
based on the input, committing at least the memory size specified in a large object heap and at least the memory size specified in a small object heap, such that at least double the amount of the memory size specified in the input is committed between the combination of the large object heap and the small object heap.
8. The system of claim 6 , wherein the input specifies information that can be used to identify a total memory size to commit, a memory size to commit for a small object heap and a memory size to commit for a large object heap such that at least the total memory size is committed between the combination of the large object heap and the small object heap as specified in the information in the input.
9. The system of claim 6 , wherein the input specifies that full blocking garbage collection should be disabled when committing the memory size specified.
10. The system of 9 , wherein the one or more computer-readable media comprise computer-executable instructions that when executed by at least one of the one or more processors cause the system to perform the following:
determining that there is enough memory space available to commit the memory size specified without running any garbage collection prior to committing the space, and as a result, committing at least the memory size specified in memory.
11. The system of 9 , wherein the one or more computer-readable media comprise computer-executable instructions that when executed by at least one of the one or more processors cause the system to perform the following:
determining that there is not enough space to commit the memory size specified without running any garbage collection;
as a result, performing a minimum blocking garbage collection to acquire a contiguous region of memory in a small object heap, wherein the minimum blocking garbage collection allocates a new segment for a small object heap;
determining that the contiguous region of memory is sufficient to commit the memory size specified; and
as a result, committing at least the memory size specified.
12. The system of claim 6 , wherein the one or more computer-readable media comprise computer-executable instructions that when executed by at least one of the one or more processors cause the system to perform the following:
determining that there is not enough memory space to commit the specified memory size, and as a result, returning an indicator indicating that memory was not committed.
13. The system of claim 6 , wherein the one or more computer-readable media comprise computer-executable instructions that when executed by at least one of the one or more processors cause the system to perform the following:
returning an indicator indicating that the specified memory size was committed in memory.
14. In a computing environment, a computer readable storage device comprising:
computer executable instructions that when executed by one or more processors causes a computer system to perform the following:
initializing, at the computer system, garbage collection to collect objects that are no longer in use for a particular managed code in a managed code environment;
receive, at the computer system, managed code including receiving managed code input specifying a desired quantum within which it is desired that no garbage collection will be performed in order to at least increase the performance of the managed code within the desired quantum;
perform, at the computer system, a computing operation to determine the desired quantum can likely be met, the computing operation including at least evaluating an anticipated resource usage rate of the managed code within the desired quantum; and
based at least on determining the desired quantum can be met, run, at the computer system, memory operations within the quantum without running the initialized garbage collection.
15. In a managed code computing environment which implements garbage collection, a method of controlling garbage collection operations, the method comprising:
initializing garbage collection to collect objects that are no longer in use for a particular managed code in a managed code environment;
receiving managed code including receiving managed code input specifying a desired quantum within which it is desired that garbage collection not be performed in order to at least increase the performance of the managed code within the desired quantum;
performing a computing operation to determine the desired quantum can likely be met, the computing operation including at least evaluating an anticipated resource usage rate of the managed code within the desired quantum; and
based at least on determining the desired quantum can be met, running memory operations within the quantum without running the initialized garbage collection.
16. The method of claim 15 , wherein the operation to determine the desired quantum can likely be met comprises committing one or more memory regions, for later object allocation, to meet the desired quantum.
17. The method of claim 15 , wherein the input specifies a memory size to commit.
18. The method of claim 17 , further comprising, based on the input, committing at least the memory size specified in a large object heap and at least the memory size specified in a small object heap, such that at least double the amount of the memory size specified in the input is committed between the combination of the large object heap and the small object heap.
19. The method of claim 17 , wherein the input specifies information that can be used to identify a total memory size to commit, a memory size to commit for a small object heap and a memory size to commit for a large object heap such that at least the total memory size is committed between the combination of the large object heap and the small object heap as specified in the information in the input.
20. The method of claim 17 , wherein the input specifies that full blocking garbage collection should be disabled when committing the memory size specified.Join the waitlist — get patent alerts
Track US9804962B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.