Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Allocation method and device of static storage

A technology of static storage and allocation method, applied in the direction of memory address/allocation/relocation, program control design, instrument, etc., can solve the problem of inability to deal with function global variables and so on

Inactive Publication Date: 2011-06-15
ST ERICSSON SEMICON BEIJING
View PDF3 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] The above multiplexing techniques are limited to static variables defined inside the function, but cannot handle the global variables of the function

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Allocation method and device of static storage
  • Allocation method and device of static storage
  • Allocation method and device of static storage

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0081] In order to make the technical problems, technical solutions and advantages to be solved by the embodiments of the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments.

[0082] The invention is an optimization method and device suitable for static storage allocation, especially suitable for static storage allocation in the field of embedded processors with limited storage resources. Through a series of data dependencies between functions, starting from the overall situation, optimize the static allocation of static variables, global variables, etc., so as to reuse storage space as much as possible and reduce the demand for storage space.

[0083] For example, in the following example, v1 is only used by functions f1 and f2, v2 is only used by functions f3 and f4, and the four functions are called in sequence. At this time, v1 and v2 can also reuse the same storage space.

[0084] char v1[100];

[0085...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides an allocation method and device of static storage, and relates to the technical field of data storage, which is invented for solving the technical problem that storage optimization is carried out on the limitation of static variables defined in functions during static storage in the prior art. The method comprises the following steps of: acquiring a module to be optimized, generating a module model according to a coupling relation among the functions; acquiring all function scheduling sequences of the module; acquiring infimum of storage space required for all variablescorresponding to the module under each function scheduling sequence; optimizing the address allocation information of all variables for each function scheduling sequence in a genetic algorithm; selecting the function scheduling sequence of the smallest storage space occupied by all optimized variables; and compiling the module according to the selected function scheduling sequence and the addressallocation information corresponding to the selected function scheduling sequence. The invention can be used for optimizing stored addresses according the global variables of the functions.

Description

technical field [0001] The present invention relates to the technical field of data storage, in particular to a static storage allocation method and device. Background technique [0002] Static storage allocation refers to the allocation of storage addresses completed when the program is compiled, and the static storage allocation is different from the dynamic storage allocation completed when the program is running. Static allocation has no runtime overhead, has no impact on program performance, and does not have problems such as allocation failures that may occur during dynamic allocation. [0003] The flexibility of static storage allocation is poor, which is mainly reflected in that a variable often occupies the allocated storage space throughout the lifetime of the program, which reduces the flexibility of storage space usage. [0004] In the prior art, in some C language compilers of the Intel 8051, a certain degree of storage multiplexing is realized. For example, t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F12/02
CPCG06F9/00G06F12/02G06F9/5016
Inventor 厉正吉
Owner ST ERICSSON SEMICON BEIJING
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products