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

Kernel-module memory management method for preventing memory leaks and multiple memory releases

A kernel module and memory leak technology, applied in the direction of memory address/allocation/relocation, etc., can solve problems such as limited system busyness, inability to completely solve memory, leaks, etc., to prevent the release of invalid memory, meet kernel availability, The effect of preventing memory leaks

Active Publication Date: 2011-06-22
NAT UNIV OF DEFENSE TECH
View PDF5 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although the garbage collection algorithm can realize asynchronous and imprecise memory recovery, it still cannot completely solve the memory leak problem because the garbage collection thread operation is limited by the busyness of the system.

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
  • Kernel-module memory management method for preventing memory leaks and multiple memory releases
  • Kernel-module memory management method for preventing memory leaks and multiple memory releases
  • Kernel-module memory management method for preventing memory leaks and multiple memory releases

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035] like Figure 4 As shown, the implementation steps of the kernel module memory management method for preventing memory leaks and multiple releases of memory in the embodiment of the present invention are as follows:

[0036] 1) Establishing a record array for recording the memory allocation record of the kernel module;

[0037] 2) When the kernel module requests the system to allocate memory, add a memory allocation record associated with the allocated memory to the record array;

[0038] 3) When the kernel module requests the system to release the memory, search the memory allocation record associated with the memory to be released in the record array, if there is an associated memory allocation record, perform memory release, and delete the memory allocation record;

[0039] 4) When the kernel module exits, scan the record array, if there is still a memory allocation record in the record array, release its associated memory one by one according to the memory allocatio...

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 kernel-module memory management method for preventing memory leaks and multiple memory releases, and the method comprises the following implementation steps: 1) establishing an array of records; 2) when a kernel module requires a system to allocate memories, adding memory allocation records associated with the allocated memories into the array of records; 3) when the kernel module requires the system to release memories, searching memory allocation records associated with the memories to be released in the array of records, if the associated memory allocation records exist, executing memory release, and cancelling the memory allocation records; and if the associated memory allocation records do not exist, issuing an alarm of 'multiple releases'; and 4) when the kernel module exits, scanning the array of records, if the array of records still has memory allocation records, releasing the memories associated with the memory allocation records one by one according to the memory allocation records, and finally, clearing the array of records. By utilizing the method disclosed by the invention, the kernel modules can be prevented from having the phenomena of memory leaks and multiple memory releases; and the method has the advantages of good memory allocation capability, low congestion degree of an operating system, less occupied resources, small memory-footprint, and good adaptability.

Description

technical field [0001] The invention relates to a memory management method of an operating system kernel module, in particular to a memory management method of the kernel module that prevents memory leaks and multiple memory release failures in the kernel module with independent functions in the operating system. Background technique [0002] The operating system kernel is a system that implements multiple functions. The inherent independence of functions and the extended characteristics required by the kernel system make modularization an important composition method of the operating system kernel. Usually the kernel is composed of multiple modules that perform different functions, each module has an independent entrance and exit, and has a closed-loop control flow. Memory is the most scarce resource during the operation of the kernel system. Dynamic on-demand allocation is the main method for the operating system kernel to meet unlimited application needs with limited memo...

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
IPC IPC(8): G06F12/02
Inventor 秦莹戴华东吴庆波刘晓建孔金珠颜跃进董攀
Owner NAT UNIV OF DEFENSE TECH
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