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

Method and device for managing small pieces of memories

A management method and technology of a management device, which are applied in the field of small-block memory management, can solve the problems of frequent use, long allocation time, memory fragmentation, etc., and achieve the effects of flexible use, high allocation efficiency, and wide use range.

Inactive Publication Date: 2016-12-07
INSPUR BEIJING ELECTRONICS INFORMATION IND
View PDF10 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This kind of small data structure is frequently used. If kmalloc or malloc is used, it will not only take a long time to allocate, but also cause memory fragmentation. If the memory pool is used, there will also be defects in allocation time.

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 device for managing small pieces of memories
  • Method and device for managing small pieces of memories

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] The core idea of ​​the present invention is to provide a small block memory management method and device, which is simple in transplantation operation, flexible in use, wide in use range, efficient in memory space utilization, and high in allocation efficiency.

[0030] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. 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.

[0031] The first small memory management method provided by the embodiment of the present application is as follows: figure 1 as shown, figure 1 It is a schematic diagram of the first small bl...

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 device for managing small pieces of memories. The method comprises the following steps of: distributing a whole piece of memory in an initialization process; dividing the whole piece of memory into multiple small pieces of memories, and indexing the small pieces of memories; connecting the small pieces of memories in series by utilizing a one-way chain table, and marking a head structure and a tail structure of the chain table by using head and tail; and, when a piece of pre-set memory needs to be used, finding a small piece of corresponding memory from the index number of the head in the chain table, and pointing the head to a next node. The method and the device disclosed by the invention have the advantages of being simple in migration operation, flexible to use and wide in use range; the memory space is utilized effectively; and the distribution efficiency is high.

Description

technical field [0001] The invention belongs to the technical field of software storage, and in particular relates to a method and device for managing small block memory. Background technique [0002] In the existing technology, when writing code, malloc is used to allocate a block of memory, kmalloc is used in the kernel mode, and free or kfree is used when releasing. This method is easy to cause memory fragmentation, resulting in no continuous allocation of a large block of memory later. The memory management method used in the normal linux kernel is shared by the partner system and the slub system. When the slub is allocated, it is aligned according to the power of 2. When the allocation is not a power of 2 When using a small block of memory, the allocated space will be larger than the actual space used, resulting in a waste of space. The reason why the system does this is to achieve a compromise for its versatility. In addition, when creating a fixed-size memory pool, a...

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/06
CPCG06F12/06
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