Integrated Dynamic Link Library Loading Reduces Memory Waste
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Dynamic link libraries (DLLs) in electronic devices often lead to memory wastage and increased time overheads due to non-integral section sizes and the need for relocation and symbol parsing, especially when a large number of DLLs are used.
Innovation Solution
A method and apparatus for dynamic link library loading that checks if a DLL is integrated, allocates a handle, and adds it to a list of loaded libraries, reducing memory waste by integrating multiple DLLs into a single integrated DLL, thereby minimizing repeated loading and relocation processes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If multiple dynamic link libraries are loaded separately, then code sharing and functionality are achieved, but running memory waste increases due to section alignment requirements
Solution Approach 1:
The patent merges multiple dynamic link libraries into a single integrated dynamic link library by combining their sections. This allows the system to maintain code sharing functionality while eliminating the memory waste caused by individual section alignment, as the combined sections can be efficiently packed without redundant padding.
Solution Approach 2:
The integrated dynamic link library serves multiple functions simultaneously - it provides code sharing across application programs while also optimizing memory utilization. The single library structure performs the roles of multiple separate libraries without incurring the cumulative memory overhead of individual alignment requirements.
2Reliability
If dynamic link libraries are loaded and relocated for each application program, then proper binding and symbol parsing are achieved, but time overheads increase due to repeated relocation operations
Solution Approach 1:
The patent performs relocation operations in advance during the library integration process rather than at runtime for each application. By pre-processing the combined sections and establishing proper bindings beforehand, the system eliminates repeated relocation operations when loading applications, thus reducing time overhead while maintaining binding accuracy.
Solution Approach 2:
The system creates a pre-processed copy of the integrated dynamic link library with all relocation information already resolved. This copied structure can be directly loaded and used by multiple application programs without requiring repeated relocation and symbol parsing operations, significantly reducing time overhead.
Data Source
AI summary
A dynamic link library loading method includes: when an identifier of a first dynamic link library is not in a list of loaded dynamic link libraries, allocating a handle to the first dynamic link library, and adding the identifier of the first dynamic link library and the handle allocated to the first dynamic link library to the list of the loaded dynamic link libraries; and when the first dynamic link library is an integrated dynamic link library, adding identifiers of one or more dynamic link libraries for integration and the handle allocated to the first dynamic link library to the list of loaded dynamic link libraries; and based on the handle allocated to the first dynamic link library, loading the first dynamic link library into a running memory of an electronic device.


