IP Library Granted Patent US 10,127,151
Granted Patent B2
US 10,127,151 · App. 15/153,755 · Granted Nov 13, 2018

Dynamically sized locals with precise garbage collection reporting

Inventors: David C. Wrighton (Redmond, WA); Scott D. Mosier (Redmond, WA); Fadi M. Hanna (Bothell, WA); Peter F. Sollich (Munich, DE); Jan Kotas (Redmond, WA)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC.
G06F12/0253G06F8/41G06F9/44563G06F12/0223G06F12/0238G06F2212/1044
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,127,151
App. No.
15/153,755
Granted
Nov 13, 2018
Kind
B2
Abstract

An instance of universally shared generic code is generated. A runtime parameter enables the size of a stack frame on which local data can be stored to be determined. Dynamically sized locals can be stored on a stack enabling precise garbage collection reporting. One frame of the stack is allocated for each code segment to simplify GC reporting. A reporting region in the frame memory region comprises a count of locals and a location at which the local is found in the stack.

Claims (51)

1. A computing device comprising:

at least one processor; and

a memory connected to the at least one processor;

wherein the at least one processor is configured to:

execute a single instance of universally shared generic code that works for all data types of variables and/or objects in each instantiation of corresponding generic source code by performing actions to:

allocate space on a stack, instead of a garbage collection heap, for local data;

store local data on the stack, wherein the local data is variably sized;

store a description of the stored local data on the stack; and

provide precise garbage collection (GC) reporting information to a subsequent process, wherein the precise GC reporting information indicates precisely where in the stack the local data is to be reclaimed.

2. The computing device of claim 1 , further comprising:

at least one program module that:

dynamically determines size of a stack frame to allocate for the local data based on at least one generic context parameter comprising a type description associated with the local data.

3. The computing device of claim 2 , wherein the at least one processor is further configured to:

receive the at least one generic context parameter at runtime.

4. The computing device of claim 1 , wherein the at least one processor is further configured to:

receive the at least one generic context parameter at runtime from which a size of the stack frame to be created is determined.

5. The computing device of claim 1 , wherein the at least one processor is configured to:

tell a subsequent process where the local data for garbage collection can be found.

6. The computing device of claim 1 , wherein the at least one processor is further configured to:

allocate space on the stack for local data associated with a particular execution of the universally shared generic code.

7. The computing device of claim 1 , wherein size of an allocated stack frame varies in accordance with size of the local data.

8. A method, comprising:

receiving by a processor of a computing device at runtime a single instance of universally shared generic code that works for all possible data types of variables and/or objects in each instantiation of generic code;

receiving a generic context parameter;

executing the single instance of universally shared generic code, wherein the behavior of the single instance of universally shared generic code is determined by the generic context parameter received at runtime, the single instance of universally shared generic code storing local data on a stack during runtime instead of on a garbage collection (GC) heap; and

generating precise garbage collection reporting information that indicates precisely where in the stack the local data is to be reclaimed.

9. The method of claim 8 , further comprising:

determining size of the stack based on a type description.

10. The method of claim 8 , further comprising:

receiving a generic context parameter comprising a type description for local data to be stored on the stack.

11. The method of claim 8 , further comprising:

receiving a generic context parameter at runtime from which stack size is dynamically determined.

12. A computing device comprising:

at least one processor; and

a memory connected to the at least one processor;

wherein the at least one processor is configured to:

receive generic source code;

generate a single instance of universally shared generic code that works for all possible data types of variables and/or objects in each instantiation of the generic code from the generic source code;

generate metadata for the universally shared generic code during compile time that is associated with field layouts and instance sizes of generic types in the generic source code; and

utilize the metadata and a generic context parameter, at runtime, to determine a size for a stack frame of a stack to allocate local data of the universally shared generic code in the stack instead of a garbage collection heap.

13. The computing device of claim 12 , wherein the at least one processor is further configured to:

provide precise garbage collection (GC) reporting information to a subsequent process, wherein the precise GC reporting information indicates precisely where in memory the local data is to be reclaimed.

14. The computing device of claim 13 , wherein the at least one processor is further configured to:

at runtime keep track of where a particular piece of local data is stored on the stack.

15. The computing device of claim 14 , wherein the at least one processor is further configured to:

tell a garbage collector when the local data can be garbage collected.

16. The computing device of claim 15 , wherein the at least one processor is further configured to:

tell the garbage collector where on the stack the local data that can be reclaimed is found.

17. The computing device of claim 13 , wherein each code segment of the generic source code is assigned a frame on the stack.

18. The computing device of claim 13 , wherein the stack comprises a reporting area.

19. The computing device of claim 12 , wherein the universally shared generic code is generated in response to receiving no parameter at compile time.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 13, 2016
From: WRIGHTON, DAVID C; MOSIER, SCOTT D; HANNA, FADI M; SOLLICH, PETER F; KOTAS, JAN
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 038580/0333 →
Continuity (1)
Related Publication 20170329704A1 · Nov 16, 2017