Check patentability & draft patents in minutes with Patsnap Eureka AI!

Method and system for managing indicator in programming language

A programming language and pointer technology, applied in the address formation of the next instruction, machine execution device, etc., can solve the problem of not guaranteeing that the program does not have wild pointers, and achieve the effect of eliminating erroneous access.

Inactive Publication Date: 2015-04-15
TCL CORPORATION
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] At present, the memory policy of the operating system is to directly kill programs that access wild pointers. In the process of developing programs using C / C++ language, programmers still cannot guarantee that there are no wild pointers in the program by virtue of rigorous logical thinking and detailed testing.

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
  • Method and system for managing indicator in programming language
  • Method and system for managing indicator in programming language
  • Method and system for managing indicator in programming language

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] The present invention provides a method and system for managing pointers in a programming language. In order to make the purpose, technical solution and effect of the present invention clearer and clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0038] Such as figure 1 as shown, figure 1 It is a flowchart of a preferred embodiment of the method for managing pointers in the programming language of the present invention, and the method for managing pointers in the programming language of the present invention includes the following steps:

[0039] Step S110, acquiring the value of the pointer.

[0040] The value of the pointer refers to the value stored in the pointer itself, and it is also the first address of the memory area pointed to...

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 discloses a method and a system for managing an indicator in programming language. The method comprises the following steps: A) acquiring the value of an indicator; B) judging whether the address position of the indicator exists in an indicator buffer chain table, if yes, executing step C, otherwise, executing step D; C) judging whether a corresponding identification position of the address position and a first integer area of internal memory indicated by the indicator have the same value, if yes, executing step E, otherwise, executing step D; D) feeding back the false value and confirming the indicator as a field indicator; and E) feeding back the true value and presenting that the indicator is effective and usable when the true value is fed back, wherein when the false value is fed back, the indicator is the field indicator and cannot be used. When the result of field indicator is acquired, the internal memory corresponding to the field indicator is released and the node corresponding to the indicator is deleted, thereby eliminating the error access of the field indicator.

Description

technical field [0001] The invention relates to the management of computer pointers, in particular to a method and system for managing pointers in a programming language. Background technique [0002] Computer programming languages ​​generally use C / C++ language or assembly language, and these programming languages ​​all use pointers as a data type. The pointer is the address pointing to a block of memory. It is similar to the house number of a house. The house number is the only way to find the house. After the house is demolished, the house number will not find the corresponding house. The house number at this time is the wild door number No. Correspondingly, the pointer at this time is called a wild pointer. [0003] If the wild pointer is used when the program is running, it will directly cause the program to exit. The exit of the program is the reaction made when the operating system detects an illegal memory operation, because the program runs on the operating system...

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/32
Inventor 甘志文
Owner TCL CORPORATION
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More