Unlock instant, AI-driven research and patent intelligence for your innovation.

Initialization method for maximum stack space of embedded system

An embedded system and setting method technology, applied in memory systems, instruments, computing, etc., can solve problems such as abnormal program crash, running chaos, stack overflow, etc., to achieve unique ideas, ensure reasonable application, and reduce costs.

Inactive Publication Date: 2011-04-20
ZTE CORP
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, a problem arises from this: How much is the size of each task stack space at the time of initialization is a very prominent problem
If the allocation of each stack space is too large, it is a great waste of limited RAM space (in embedded systems, it is often due to cost issues, so it is better to occupy less RAM space), if the allocation is too small, it will cause stack overflow , this will cause the program to crash abnormally, restart, and run chaotically, with very serious consequences

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
  • Initialization method for maximum stack space of embedded system
  • Initialization method for maximum stack space of embedded system
  • Initialization method for maximum stack space of embedded system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] Below according to accompanying drawing and embodiment the present invention will be described in further detail:

[0020] The basic method of the present invention is: firstly, according to the space situation of each task, predetermine the maximum expected value of the stack space of this task; The maximum value, which finally determines the maximum stack space of the task. see figure 2 , the specific implementation of this technical solution includes the following steps:

[0021] 1. Pre-estimate a maximum estimated value according to the space situation of each task. This value can be set relatively large. For example, if the task occupies a large amount, it can be set to 8192 bytes first, and if the task is small, it can be set to 4096 bytes first. If the code is based on a certain solution, the general solution will give a suggested value, and the maximum expected value can be set to about 2 times the suggested value. In short, a larger stack space value should...

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

A setting method for the largest stack space of an embedded system includes the following steps: A. the largest predicted value of the stack space of the commission is predetermined according to the space condition of every commission; B. the practical largest value of the commission for occupying the stack space is obtained after a period of practical operation; C. the largest stack space of thecommission is ultimately determined according to the practical largest value. When the method of the invention is adopted to arrange the largest stack space, abnormality can not be caused by the shortage of the stack space, RAM space can not be wasted owing to the aim of avoiding the overflowing, the reasonable application of the RAM space can be effectively guaranteed, the unnecessary cost expenditure is reduced and the cost is lowered.

Description

technical field [0001] The invention relates to a method for setting the maximum stack space of a CDMA (Code Division Multiple Access) wireless communication terminal product, in particular to a method for setting the maximum stack space of an embedded system. Background technique [0002] At present, in many cases, embedded systems are sensitive to cost requirements, and the RAM space used is relatively limited, so the method of fixed stack space (such as figure 1 As shown), the size of the fixed stack space when each task is initialized has great advantages: the algorithm for task scheduling is relatively simple, and the execution efficiency is higher than that of dynamically allocating stack space, and the speed is faster. [0003] However, a problem arises from this: how much to set the stack space of each task during initialization is a very prominent problem. If the allocation of each stack space is too large, it is a great waste of limited RAM space (in embedded syst...

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 Patents(China)
IPC IPC(8): G06F9/44G06F12/00
Inventor 李夏忠蔡红红
Owner ZTE CORP