Linker Circuit Dynamic Memory Expansion for OOM Handling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
During the software development process, out-of-memory (OOM) events occur when a memory segment cannot accommodate an input section, causing the linking process to terminate, and frequent interruptions lead to inefficiencies in memory allocation.
Innovation Solution
A method that estimates the required memory expansion size to accommodate input sections, expands the memory segment accordingly, and creates a map file to record memory expansion information, allowing for continuous linking and subsequent modification of the linker description file (LDF) for improved memory allocation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the linker uses a fixed memory segment size as specified by the LDF, then the linking process is simple and fast, but out-of-memory events occur frequently when input sections cannot be accommodated
Solution Approach 1:
The memory segment size is transformed from a fixed value to a dynamic value. The linker automatically expands the memory segment size when OOM events occur, allowing the memory allocation to adapt to the actual size requirements of input sections. This dynamic adjustment eliminates the need for manual LDF modification while maintaining linking efficiency.
Solution Approach 2:
The linker performs self-adjustment of memory segment sizes without external intervention. When an OOM event is detected, the linker automatically estimates the required expansion size and modifies the memory segment accordingly, eliminating the need for user intervention to modify the LDF file.
2Reliability
If the linker terminates the linking process when an OOM event occurs, then memory allocation is conservative and safe, but the linking process is interrupted frequently and requires manual LDF modification
Solution Approach 1:
The linker performs preliminary estimation of the required memory expansion size before actually expanding the memory segment. By calculating the difference between the input section size and available memory space in advance, the linker can prepare the appropriate expansion size and execute the expansion smoothly, preventing interruptions.
Solution Approach 2:
The linking process maintains continuous execution by automatically handling OOM events through dynamic memory expansion. Instead of terminating when memory is insufficient, the linker continues the linking process by expanding the memory segment to accommodate the input section, ensuring uninterrupted processing.
3Reliability
If the linker manually modifies the LDF to increase memory segment size, then the memory segment can accommodate all input sections, but the process becomes complex and time-consuming
Solution Approach 1:
The linker automatically manages memory segment size adjustments without requiring manual LDF modification. The system self-adjusts the memory allocation by expanding segments when OOM events occur, eliminating the complexity of manual configuration and file editing.
Solution Approach 2:
The linker dynamically changes the memory segment size parameter during the linking process. Instead of using a fixed size defined in the LDF, the linker adjusts the actual memory allocation parameter based on the size of input sections, transforming the static configuration into a dynamic parameter adjustment mechanism.
Data Source
AI summary
Aspects of the disclosure provide a method for linking input files during a linking process. The method includes receiving an input section that is to be mapped to a memory segment by a linker circuit, determining whether an out-of-memory (OOM) event occurs when an available memory space of the memory segment is unable to accommodate the input section, estimating a memory expansion size that would be required for the memory segment to be able to accommodate the input section when an OOM event occurs, and creating by the linker circuit a map file that includes the estimated memory expansion size of the memory segment.


