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

A memory allocation method and release method of a linux operating system

A memory allocation and operating system technology, applied in the memory allocation method and release field of the Linux operating system, can solve the problems of reducing memory allocation and utilization efficiency, small memory blocks cannot be merged, and partnerships are not satisfied, so as to reduce memory release Probability of request failure, increase the probability of merging, and reduce the effect of memory fragmentation

Active Publication Date: 2018-12-07
INSPUR BEIJING ELECTRONICS INFORMATION IND
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example, there are two memory blocks, although the size of the two memory blocks is the same, the physical location is adjacent, but because the addresses of the two memory blocks are not continuous, for example, the last two bits are not the same, the two memory blocks do not satisfy the partnership, and therefore also Cannot be merged into a large memory block, resulting in many small memory blocks that cannot be merged into a large memory block, reducing memory allocation and utilization 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
  • A memory allocation method and release method of a linux operating system
  • A memory allocation method and release method of a linux operating system
  • A memory allocation method and release method of a linux operating system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0049] The core of the present invention is to provide a memory allocation method and allocation method of a Linux operating system.

[0050] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0051] figure 1 It is a flow chart of a memory allocation metho...

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 allocation method of the Linux operation system. The memory allocation method of the Linux operation system comprises the steps that whether memory space meeting a memory allocation request is available or not is judged; if yes, whether a target memory block corresponding to the memory allocation request is included in a first chain table or not is judged; if not, a second target sub-chain table is determined in a second chain table according to the target grade corresponding to the memory allocation request; whether the target memory block is included in the second target sub-chain table or not is judged, and if not, the memory allocated to the Linux operation system is reduced. According to the allocation method, the second chain table and a second bitmap are increased based on the data structure of an existing partner algorithm, further trying can be carried out in the second chain table when the memory space of the memory allocation request is not obtained in the first chain table, the failure probability of the memory allocation request is reduced, the memory allocation efficiency is improved, and the utilization rate of the memory space is further increased. The invention further discloses a memory releasing method of the Linux operation system. The memory releasing method has the advantages of the memory allocation method.

Description

technical field [0001] The invention relates to the technical field of computer storage, in particular to a memory allocation method and release method of a Linux operating system. Background technique [0002] In the Linux operating system, the management and allocation of memory is an important factor affecting the stable operation of the system. The existing allocation method is based on the buddy algorithm. The buddy algorithm minimizes memory fragmentation. Its data structure includes a linked list and a bitmap. The linked list organizes memory blocks of the same level together, and the bitmap indicates each memory block. The state of the corresponding partner block. When memory is allocated, it is necessary to determine how to allocate memory according to this state. Two memory blocks satisfying the following conditions are partner blocks: the size of the two memory blocks is the same, the physical positions of the two memory blocks are adjacent, and only the last bit...

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): G06F12/02
CPCG06F12/023G06F12/0253G06F12/0292G06F2212/1044
Inventor 刘相乐
Owner INSPUR BEIJING ELECTRONICS INFORMATION IND
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