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

Memory management method and device and related equipment

A technology of memory management and memory blocks, which is applied in the direction of multi-program device, program control design, electrical digital data processing, etc., can solve the problems of memory leakage, communication efficiency reduction, consumers can not release memory, etc., to achieve high-efficiency communication, The effect of no memory leak

Pending Publication Date: 2021-12-31
杭州安恒信息安全技术有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, if the producer crashes during step 2, the consumer will not be able to release the occupied memory, resulting in a memory leak
In related technologies, data sharing can be realized through the inter-process communication mechanism provided by the operating system. When a process crashes, the operating system will be responsible for reclaiming memory. However, these communication mechanisms depend on specific operating system functions and are locked. Yes, and the lock queue will reduce the communication efficiency

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
  • Memory management method and device and related equipment
  • Memory management method and device and related equipment
  • Memory management method and device and related equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0055] The core of this application is to provide a memory management method, which can ensure high-efficiency communication while ensuring that no memory leaks occur when a process crashes; another core of this application is to provide a memory management device, equipment and The computer-readable storage medium also has the above beneficial effects.

[0056] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Apparently, the described embodiments are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0057] The embo...

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 memory management method, which comprises the following steps of: logging in a shared memory according to a recovery instruction, and traversing each memory block in the shared memory; judging whether the marked timestamp of the memory block is 0 or not, wherein the marking timestamp is marked when the memory block is allocated for a calling program; if the marked timestamp is not 0, judging whether a difference value between the current timestamp and the marked timestamp exceeds a preset threshold value or not; if the difference value exceeds the preset threshold value, judging whether the memory block is a queue head memory block or not; if the memory block is not the queue head memory block, releasing the memory block. According to the memory management method, high-efficiency communication can be achieved, and meanwhile it is guaranteed that memory leakage does not occur when the process crashes. The invention furthermore discloses a memory management apparatus and device, and a computer readable storage medium, which all have the above beneficial effects.

Description

technical field [0001] The present application relates to the technical field of data storage, in particular to a memory management method, and also to a memory management device, device, and computer-readable storage medium. Background technique [0002] The lock-free queue based on shared memory is a widely used method for efficient communication between processes. Among them, the lock-free queue is generally a ring queue. When the ring queue is located on the shared memory, data can be shared between processes. , to achieve inter-process communication. [0003] For a lock-free queue based on shared memory, the memory usage of the producer is divided into the following steps: Step 1 is to allocate memory, and the producer monopolizes a section of memory from the shared memory; Step 2 is to use the memory and write the data that needs to be shared Enter the exclusive memory; Step 3 is to queue the memory, and put the memory into the queue. Among them, the enqueued memory ...

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/50
CPCG06F9/5016G06F9/5022
Inventor 赵康张月明
Owner 杭州安恒信息安全技术有限公司
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