Meta garbage collection for functional code
First Claim
Patent Images
1. A method comprising:
- receiving an application to execute;
identifying a plurality of program segments within said application, said program segments having at least one function and receive an input and return an output without changing state to items that are not said input and said output;
executing a first program segment, said first program segment calling a second program segment;
launching said second program segment within an operating system, said operating system having a memory page table having a page identifier, a process identifier, and a page state for each of a plurality of memory pages;
requesting a first memory page from an operating system, said first memory page being allocated to said second program segment;
executing said second program segment using said first memory page and passing said input to said second program segment and receiving said output from said second program segment;
determining that said second program segment has completed execution and ending said second program in said operating system such that said operating system releases said first memory page.
2 Assignments
0 Petitions
Accused Products
Abstract
An execution environment for functional code may treat application segments as individual programs for memory management. A larger program of application may be segmented into functional blocks that receive an input and return a value, but operate without changing state of other memory objects. The program segments may have memory pages allocated to the segments by the operating system as other full programs, and may deallocate memory pages when the segments finish operating. Functional programming languages and imperative programming languages may define program segments explicitly or implicitly, and the program segments may be identified at compile time or runtime.
-
Citations
22 Claims
-
1. A method comprising:
-
receiving an application to execute; identifying a plurality of program segments within said application, said program segments having at least one function and receive an input and return an output without changing state to items that are not said input and said output; executing a first program segment, said first program segment calling a second program segment; launching said second program segment within an operating system, said operating system having a memory page table having a page identifier, a process identifier, and a page state for each of a plurality of memory pages; requesting a first memory page from an operating system, said first memory page being allocated to said second program segment; executing said second program segment using said first memory page and passing said input to said second program segment and receiving said output from said second program segment; determining that said second program segment has completed execution and ending said second program in said operating system such that said operating system releases said first memory page. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A system comprising:
-
at least one processor; a functional block analyzer that identifies functional blocks of an application program; an operating system having a memory page table having a page identifier, a process identifier, and a page state for each of a plurality of memory pages, said operating system that further allocates pages to executing code; an operating environment executing on said at least one processor, said operating environment that; receives an application to execute; executes a first program segment, said first program segment calling a first functional block; launches said first functional block within an operating system, causing a first memory page to be allocated from said operating system; executes said first functional block using said first memory page and passing said input to said first functional block and receiving said output from said first functional block; determines that said first functional block has completed execution and ending said first functional block in said operating system such that said operating system releases said first memory page. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20)
-
-
21. A method comprising:
-
receiving an application to execute; identifying a plurality of program segments within said application; executing a first program segment, said first program segment calling a second program segment; launching said second program segment within an operating system as an independent application, said operating system having a memory page table having a page identifier, a process identifier, and a page state for each of a plurality of memory pages; requesting a first memory page from an operating system, said first memory page being allocated to said second program segment; executing said second program segment using said first memory page and passing said input to said second program segment and receiving said output from said second program segment; determining that said second program segment has completed execution and ending said second program in said operating system such that said operating system releases said first memory page.
-
-
22. A system comprising:
-
an operating system having a memory page table having a page identifier, a process identifier, and a page state for each of a plurality of memory pages, said operating system that further allocates pages to executing code; an operating environment executing on said at least one processor, said operating environment that; receives an application to execute; executes a first program segment, said first program segment calling a first functional block; launches said first functional block within an operating system, causing a first memory page to be allocated from said operating system; executes said first functional block using said first memory page and passing said input to said first functional block and receiving said output from said first functional block; determines that said first functional block has completed execution and ending said first functional block in said operating system such that said operating system releases said first memory page.
-
Specification