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

Memory allocation method and device, electronic device and storage medium

A memory allocation and memory block technology, applied in the field of data processing, can solve the problem of low memory allocation efficiency and achieve the effect of improving memory allocation efficiency

Active Publication Date: 2021-10-15
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present application provides a memory allocation method and device, electronic equipment and a storage medium, so as to at least solve the problem of low memory allocation efficiency caused by locking and serialization in the memory allocation method in the related art when multiple threads concurrently apply for memory.

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 allocation method and device, electronic device and storage medium
  • Memory allocation method and device, electronic device and storage medium
  • Memory allocation method and device, electronic device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is an embodiment of a part of the application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

[0034] It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such...

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 present application provides a memory allocation method and device, an electronic device, and a storage medium, wherein the method includes: receiving a memory application message sent by a first thread, wherein the first thread is a thread corresponding to a target application, and the memory application The message is used to apply for the memory space of the target memory size; in response to the memory application message, the target memory block corresponding to the target thread ID of the first thread is determined from multiple memory blocks, wherein the multiple memory blocks are allocated for the target application Memory block, multiple memory blocks allow parallel locking to apply for memory; in the case of finding the first memory space whose memory size is greater than or equal to the target memory size from the free memory space of the target memory block, allocate the first memory space to first thread. The present application solves the problem that the memory allocation method in the related art tends to cause low memory allocation efficiency caused by locking and serialization when multiple threads concurrently apply for memory.

Description

technical field [0001] The present application relates to the field of data processing, and in particular to a memory allocation method and device, electronic equipment and storage media. Background technique [0002] At present, in the business logic (for example, the use of memory cache) of databases such as MySQL (a relational database management system), the memory space used for querying data and updating data is passed through malloc (memoryallocation, which refers to dynamic memory allocation) function) allocation, that is, all memory space is completed through dynamic application. [0003] Most of the above business logic uses temporary memory. After a transaction or a connection is completed, all the dynamically applied memory space will be released. During a transaction, there are a large number of memory applications to be released. lead to massive memory fragmentation. [0004] For the allocation method of the above memory space, the memory application is too f...

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): G06F9/50
CPCG06F9/5016
Inventor 邱海港
Owner BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
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