Method and device for memory allocation

A memory allocation and memory technology, applied in the computer field, can solve the problem that memory allocation cannot have both high performance and high utilization memory size, and achieve the effect of less fragmentation, high performance and improved performance.

Inactive Publication Date: 2015-11-25
HUAWEI TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The embodiment of the present invention proposes a method and device for memory allocation, aiming to solve the problem that the existing memory allocation cannot have both high performance and high utilization rate and apply for any memory size

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 memory allocation
  • Method and device for memory allocation
  • Method and device for memory allocation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are part 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 shall fall within the protection scope of the present invention.

[0026] The memory allocation method of the embodiment of the present invention will be described in detail below in conjunction with the accompanying drawings. Such as figure 1 shown, including the following steps.

[0027] 11. Connect the free memory block in series to the corresponding free linked list, the head pointer of the free linked list is maintained in the free linked list head array with a size of N, and the corresponding free linked list point...

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 embodiment of the invention provides a method and a device for allocating an internal memory, wherein the method comprises the following steps: serially connecting idle internal memory blocks to a corresponding idle linked list, wherein a head indicator of the idle linked list is maintained in an idle linked list head array with the magnitude being N, an index of the corresponding idle linked list indicated by the head indicator in the idle linked list head array is n, and the idle linked list with the index being n is used for serially connecting the idle internal memory blocks with the magnitude being X; when the magnitude of the applied internal memory is Y, confirming a first nonblank idle linked list between the idle linked list with the index being m+1 and the idle linked list with the index being n by starting from the idle linked list with the index being m+1; and extracting a first idle internal memory block in the first nonblank idle linked list and allocating the first idle internal memory block according to the magnitude of the applied internal memory. The method provided by the invention has high property while has the characteristics of few fragments and capability of applying the internal memory at any magnitude.

Description

technical field [0001] The present invention relates to the field of computers, in particular to a memory allocation method and device. Background technique [0002] In computer applications such as software programming, dynamic application and release of memory resources are often involved. For example, when creating a thread, you need to allocate stack space for the thread, and when the thread is deleted, you need to reclaim the corresponding stack space. Regarding memory management, there are many algorithms in the industry, each with its own advantages and disadvantages. To evaluate the pros and cons of a memory algorithm, there are mainly factors such as performance, utilization, reliability, and formatability. [0003] Memory algorithms are mainly divided into static memory algorithms, block memory algorithms, and split-merge memory algorithms. The performance of the static memory algorithm is very high, but it can only apply for memory resources and cannot release ...

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/06
Inventor 雷镇
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products