Source Code Storage Mapping via Section Attributes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current multi-tier storage systems require complex configuration for each variable and function, leading to increased development workload and maintenance costs due to the need for separate mapping relationships, which is inefficient and labor-intensive.

Innovation Solution

A storage space mapping method that parses source code to establish a mapping relationship between functions and variables and storage area identifiers defined at the file or folder level, allowing automatic mapping and reducing the need for individual configurations, thereby simplifying the implementation of multi-tier storage and lowering costs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If separate configuration is performed for each variable and function to establish mapping relationships, then storage space mapping precision is improved, but device complexity and development workload increase significantly

Engineering Contradiction:
Improvestorage space mapping precisionVSAvoidconfiguration complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent merges the configuration of multiple variables and functions into a unified section attribute configuration. Instead of configuring each symbol individually, the system allows configuring an entire section (e.g., `.l1.data`, `.l2.data`) that automatically applies to all symbols within that section, thereby reducing configuration complexity while maintaining mapping precision.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The section attribute configuration mechanism serves multiple functions simultaneously: it defines storage location, specifies memory tier, and applies to multiple symbols at once. This universal configuration approach eliminates the need for separate individual mappings while achieving the same or better mapping precision through hierarchical section-based organization.

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

2Manufacturing precision

If separate mapping relationships are established for each variable and function, then storage allocation accuracy is improved, but development workload and maintenance costs increase

Engineering Contradiction:
Improvestorage allocation accuracyVSAvoiddevelopment efficiency
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The system performs preliminary organization of symbols into sections during the compilation process. By pre-grouping variables and functions into logical sections based on their usage patterns and requirements, the system enables automatic storage allocation without requiring manual configuration for each symbol, thereby improving development efficiency while maintaining allocation accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The compiler automatically generates the mapping relationships between symbols and storage locations based on the section attributes defined in the source code. This self-service mechanism eliminates the need for manual configuration of each variable and function, significantly reducing development workload and maintenance costs while preserving storage allocation accuracy through automated parsing and mapping.

Inventive Principle:
Principle #25Self-service

3Measurement precision

If manual insertion of directives is performed for each variable to specify storage location, then mapping accuracy is improved, but ease of operation deteriorates

Engineering Contradiction:
Improvemapping accuracyVSAvoidconfiguration ease
Core Design Contradiction:
Measurement precisionVSEase of operation

Solution Approach 1:

The section attribute acts as an intermediary mechanism between the developer's high-level storage requirements and the compiler's low-level allocation process. By defining sections with desired storage characteristics at the source code level, developers can specify storage locations without manually inserting directives for each variable, improving ease of operation while maintaining mapping accuracy through the intermediary section-based abstraction.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP2854036B1Storage space mapping method and device
Publication Date: 2020.02.19 HUAWEI TECH CO LTD
  • EP2854036B1 patent drawingFigure 1~3
  • EP2854036B1 patent drawingFigure 4

AI summary

Embodiments of the present invention provide a storage space mapping method and apparatus. The method includes: parsing source code, so as to acquire a home file and/or a home folder of each function and/or variable in the source code; acquiring a mapping relationship between the home file and a storage area identifier and/or between the home folder and a storage area identifier, and establishing, according to the mapping relationship, a mapping relationship between each function and/or variable and the storage area identifier; and mapping, according to a mapping relationship between the storage area identifier and storage space, each function and/or variable to the storage space. According to the storage space mapping method and apparatus provided in the embodiments of the present invention, development workload and maintenance costs of storage space mapping can be greatly reduced.