Integrated Dynamic Link Library Loading Reduces Memory Waste

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecode sharing capabilityVSAvoidrunning memory waste
Core Design Contradiction:
Adaptability or versatilityVSLoss of substance

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.

Inventive Principle:
Principle #5Merging (Combining)

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

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

Engineering Contradiction:
Improvebinding accuracyVSAvoidrelocation time overhead
Core Design Contradiction:
ReliabilityVSLoss of time

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11886222B1Dynamic link library loading method and apparatus
Publication Date: 2024.01.30 HUAWEI TECH CO LTD
  • US11886222B1 patent drawing
  • US11886222B1 patent drawing
  • US11886222B1 patent drawing

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.