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

Pointer variable release method and device

A pointer variable and release device technology, applied in the computer field, can solve problems such as inability to access data and business interruption

Pending Publication Date: 2021-11-16
NEW H3C SECURITY TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

After successfully acquiring the lock, if the thread is abnormal and cannot release the lock, other threads will not be able to access the data because they cannot acquire the lock, which will also cause business interruption

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
  • Pointer variable release method and device
  • Pointer variable release method and device
  • Pointer variable release method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art based on this application belong to the scope of protection of this application.

[0054] The embodiment of the present application provides a method for releasing a pointer variable, which can be applied to an electronic device, and the electronic device can run an application program based on C language. During the running of the application program, the electronic device can access the data stored in the memory space indicated by the pointer variable through the thread. Correspondingly, at the end of the access, the delayed release of the pointer variable can be impl...

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 embodiment of the invention provides a pointer variable release method and device, and relates to the technical field of computers. The method comprises the following steps: when a write thread needs to release a first pointer variable and an opened read thread exists currently, recording the mapping relation between the first pointer variable and the currently opened read thread, determining the first pointer variable as a to-be-released pointer variable; when the opened first read thread is closed, determining a second pointer variable corresponding to the first read thread in the current pointer variables to be released; deleting a mapping relationship between the second pointer variable and the first read thread; and if the corresponding read thread does not exist in the second pointer variable in the currently recorded mapping relation, releasing the second pointer variable. In this way, service interruption can be avoided under the condition that the multiple read threads access the pointer variable concurrently.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a pointer variable release method and device. Background technique [0002] During the running of the application, data can be accessed by multiple threads. For example, in an application program based on C language, data can be written into a pointer variable through a writing thread, and data can also be read from the pointer variable through a reading thread. [0003] In related technologies, concurrent access of threads is implemented based on locks. For example, a thread needs to acquire a lock before it can perform read or write access. After successfully acquiring the lock, the thread can access the corresponding data. After successfully acquiring the lock, if the thread is abnormal and cannot release the lock, other threads will not be able to access the data because they cannot acquire the lock, which will also cause business interruption. Contents of th...

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): G06F9/445G06F9/52G06F9/448
CPCG06F9/44594G06F9/524G06F9/449G06F9/4482
Inventor 杨益泉
Owner NEW H3C SECURITY TECH CO LTD
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