Unlock instant, AI-driven research and patent intelligence for your innovation.

Dynamic memory management method

A management method and dynamic memory technology, applied in the field of memory management, can solve problems such as inability to meet the requirements of multi-space attribute dynamic memory management

Pending Publication Date: 2022-03-22
JIANGNAN INST OF COMPUTING TECH
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the present invention is to provide a dynamic memory management method to solve the problem that the simple use of malloc and free functions cannot meet the dynamic memory management requirements of multi-space attributes in a programming environment that supports multi-space attributes

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
  • Dynamic memory management method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0018] Embodiment: the present invention provides a kind of dynamic memory management method, based on the following function interface:

[0019] The xspace_malloc function is used to dynamically apply for the x attribute memory space;

[0020] The xspace_free function is used to release the x attribute memory space;

[0021] The get_allocatable_xspace_size function is used to return the size of the remaining dynamically allocated x-attribute memory space;

[0022] Include the following steps:

[0023] S1. The user uses the loader to load the object code to run the project, and specifies the total size of the x attribute memory space when running the project;

[0024] S2. The loader receives the total size of the x-attribute memory space specified by the user, and opens up an x-attribute memory space of a corresponding size;

[0025] S3. The loader loads the project object code, maps the static x-attribute memory space in the object code to the first half of the x-attribute...

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 dynamic memory management method. The method comprises the following steps: S1, appointing the total size of an x attribute memory space during task operation; s2, opening up an x attribute memory space with a corresponding size; s3, mapping the static x attribute memory space in the target code to the first half part of the x attribute memory space developed in the S2, wherein the remaining second half part of the x attribute memory space is the dynamic x attribute memory space; s4, the user subject calls an xspacemalloc function in the code to dynamically apply for an x attribute memory space; and S6, the user subject can call getalocatablexspace in the code to obtain the size of the current residual dynamic x attribute memory space. The problem that in a programming environment supporting multiple space attributes, the dynamic memory management requirement of the multiple space attributes cannot be met by purely using malloc and free functions is solved.

Description

technical field [0001] The invention relates to a dynamic memory management method, which belongs to the technical field of memory management. Background technique [0002] Code programs generally use malloc and free functions for dynamic memory allocation and release. The malloc function calls the mmap function to dynamically apply for memory space through the operating system, and calls the free function to release the memory space after the dynamic memory is used up. In many programming environments, there are multiple memory spaces with different attributes, and memory spaces with different attributes need to provide corresponding interfaces for dynamic memory management. The existing malloc and free functions support user projects to dynamically manage the memory space of a single space attribute, but cannot meet the dynamic memory management requirements of multiple space attributes. Contents of the invention [0003] The purpose of the present invention is to provi...

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 Applications(China)
IPC IPC(8): G06F9/50
CPCG06F9/5016
Inventor 钱宏王飞吴伟朱琪管茂林杨涛尉红梅
Owner JIANGNAN INST OF COMPUTING TECH