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

Memory usage optimization method, device and readable storage medium

A technology of memory occupation and optimization method, which is applied in the field of data processing, can solve problems such as memory occupation, and achieve the effect of reducing memory occupation

Active Publication Date: 2021-01-01
WUHAN DOUYU NETWORK TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to overcome the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a memory occupation optimization method, device and readable storage medium, which can solve the problems caused by inheriting some uncommon interfaces when derived classes inherit multiple interfaces. Non-essential occupation of memory, thus reducing the memory occupation of the entire program to a certain extent

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 usage optimization method, device and readable storage medium
  • Memory usage optimization method, device and readable storage medium
  • Memory usage optimization method, device and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] In the C++ language, an interface is a special class that cannot be instantiated, that is, a class object cannot be created, and can only be inherited by its derived class, so that the interface can be used by creating an object of the derived class. The advantage of using interfaces is that declarations and implementations can be separated, and any combination of interfaces can be combined to form a componentized programming model.

[0043] The inventor found in actual research that since the interface cannot be instantiated, the interface can only be used by instantiating the derived class by inheriting and implementing the interface through its derived class. But if a derived class inherits multiple interfaces, then as the number of inherited interfaces increases, the size of the derived class will continue to increase. The increase in the size of the derived class means that when creating an instance of the derived class , it will consume more memory, but some of th...

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

An embodiment of the invention provides a method and a device for optimizing memory occupation, and a readable storage medium. The method includes acquiring target interfaces required to be called ininterface calling instructions after the interface calling instructions are received; judging whether the target interfaces are rarely used interfaces or not on the basis of rarely used interface lists; searching target interface objects in derived class corresponding to the target interfaces if the target interfaces are the rarely used interfaces; creating examples of the target interface objectsto call the target interfaces. The target interface objects correspond to the target interfaces. Corresponding occupied memories are increased in the derived class in target interface calling statesand are released by the derived class after the target interface calling states are terminated, so that the memory occupation can be optimized. The method, the device and the readable storage medium have the advantages that the problem of non-essential occupation of memories due to the fact that certain rarely used interfaces are inherited by existing derived class when a plurality of interfaces are inherited by the existing derived class can be solved, and accordingly the memory occupation of integral programs can be reduced to a certain extent.

Description

technical field [0001] The present invention relates to the technical field of data processing, in particular to a memory occupation optimization method, device and readable storage medium. Background technique [0002] In the C++ language, an interface is a special class that cannot be instantiated, that is, a class object cannot be created, and can only be inherited by its derived class, so that the interface can be used by creating an object of the derived class. The advantage of using interfaces is that declarations and implementations can be separated, and any combination of interfaces can be combined to form a componentized programming model. [0003] The inventor found in actual research that since the interface cannot be instantiated, the interface can only be used by instantiating the derived class by inheriting and implementing the interface through its derived class. But if a derived class inherits multiple interfaces, then as the number of inherited interfaces i...

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 WUHAN DOUYU NETWORK TECH CO LTD