Heapification Address Conversion via Working Set Scanning
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for heapification, which involve copying objects from the stack to the heap in processing systems, are inefficient due to the need to scan all stack frames to rewrite addresses, leading to prolonged processing times.
Innovation Solution
A method where a working set stores the address of a stack object to be copied, and the system sequentially scans stack frames to find and convert pointers, terminating the scan when no pointers are found, thereby reducing the need to scan all frames.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all stack frames are scanned to rewrite addresses during heapification, then address correctness is ensured, but processing time increases significantly
Solution Approach 1:
The patent applies partial action by scanning only the necessary portion of stack frames rather than all frames. The working set mechanism identifies which stack frames actually contain pointers to the heapified object, allowing the system to perform address rewriting only where needed. This reduces the scanning scope from the entire stack to only the relevant frames, maintaining address correctness while significantly reducing processing time.
Solution Approach 2:
The working set data structure serves itself by automatically tracking which stack frames contain pointers to heapified objects. As objects are heapified, their addresses are registered in the working set, which then autonomously identifies the relevant stack frames that need address rewriting. This self-service mechanism eliminates the need for comprehensive stack scanning, as the working set independently provides the necessary information about which frames to process.
2Productivity
If stack scanning is optimized to terminate early, then processing speed improves, but risk of missing pointers increases
Solution Approach 1:
The patent applies preliminary action by pre-registering heapified object addresses in the working set before stack scanning begins. This preliminary registration creates a reliable index that guides the scanning process, ensuring that all pointers to heapified objects are identified without requiring exhaustive scanning of all stack frames. The working set is prepared in advance to contain exactly the information needed for complete and accurate pointer detection.
Solution Approach 2:
The working set provides continuous feedback during the stack scanning process by maintaining an updated record of which stack frames contain pointers to heapified objects. As the scanner progresses through stack frames, the working set feedback mechanism confirms whether pointers are present or absent, allowing the system to terminate scanning early with confidence when all necessary pointers have been identified. This feedback loop ensures pointer completeness while enabling early termination.
Data Source
AI summary
A method, an article of manufacture, and system for heapifying an object. The method includes: storing, in a working set, a first address of a certain object in a stack frame, copying the certain object into the heap area and holding a second address of the certain object in the heap area, following each stack frame to find a pointer pointing to the first address stored in the working set, converting the address that the pointer points to into the second address, proceeding to a next stack frame, where the address conversion includes storing an address of another object in the working set if the converted address is stored as a value of a field of the other object in the stack frame, and terminating the process in response to a lack of pointers found in the stack frame to point to the addresses stored in the working set.


