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

Memory block combination method and system

A memory block and memory technology, applied in memory systems, memory address/allocation/relocation, instruments, etc., can solve the problems of inability to merge memory blocks and low merge efficiency, and achieve the effect of improving fragment merge efficiency and reducing the number

Active Publication Date: 2016-03-16
INSPUR BEIJING ELECTRONICS INFORMATION IND
View PDF4 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In such a merging method, if there is a situation of 1k2k1k4k, the partner algorithm will not be able to merge this memory block, and the merging efficiency is low

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 block combination method and system
  • Memory block combination method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0031] The embodiment of the present invention provides a memory block merging method, including:

[0032] Step A: Scan memory blocks whose memory size is smaller than a preset memory threshold, and determine memory blocks whose memory is smaller than or equal to a preset fragment memory threshold as memory fragments;

[0033] If the preset fragmentation threshold is set to 1024k, memory blocks smaller than 1024k and 2 to the nth power are considered memory fragments.

[0034] Step B: obtaining the address of the memory fragment;

[0035] Starting from the first address, after finding a memory fragment, return its address.

[0036] Step C: Taking the address of the memory fragment as a starting point, it is judged whether the memory sum of the free blocks on the continuous addresses can reach the preset merged memory threshold, and if so, the memory sum reaches the preset merged memory threshold Merge free blocks to get a large memory block, go to step E, otherwise go to ste...

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 block combination method and system. The method comprises: scanning all memory blocks of less than certain sizes, regarding the memory blocks as memory fragments, and returning an address of one memory fragment after finding the memory fragment from a head address; by taking the returned address of the memory fragment as a starting point, backwards viewing whether a preset number of blocks are all idle blocks, if yes, combining the blocks into one, if not, searching for whether a half of the preset number of the blocks are all idle blocks, and if yes, combining the blocks; and processing the rest of memory blocks in the same manner to ensure that a biggest possible memory block is obtained to reduce the number of the memory fragments, and finally globally combining adjacent memory blocks same in size to ensure that the memory fragments can be combined as far as possible and a biggest possible available idle block can be obtained. Therefore, the fragment combination efficiency is improved.

Description

technical field [0001] The invention relates to the field of Linux system memory management, in particular to a memory block merging method and system. Background technique [0002] Now the server or PC will run slowly after running for a period of time, and the freeze phenomenon often occurs. This is due to the system's inefficiency in allocating memory to processes. The reason for the reduction in memory allocation efficiency is that after long-term operation, the available continuous large memory in the system has become very small, basically all are separated small memory blocks, when the process applies for memory , the system has to cobble together these small chunks of memory here and there to keep the process running. [0003] The original memory block merging method is the buddy algorithm, and the memory blocks that meet the following conditions can be merged: (1) two memory blocks are continuous; (2) the two memory blocks are equal in size; after merging, continu...

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