Method for solving RAM (Random Access Memory) fragments generation during drawing of Windows GDI (Graphics Device Interface)

A technology of memory fragmentation and memory, which is applied in the field of improving WINDOWS system memory management methods, can solve problems such as memory fragmentation, achieve the effects of improving stability and speed, reducing CPU time, and avoiding memory fragmentation

Active Publication Date: 2013-11-06
HUIZHOU DESAY SV AUTOMOTIVE
View PDF2 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] In view of this, the present invention provides a method for solving the memory fragmentation caused by Windows GDI drawing, which can effectively solve the problem of memory fragmentation caused by frequent creation and destruction of memory device context objects and memory bitmap objects when the window is drawn

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] In order to allow those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described below in conjunction with the examples.

[0020] The method used in this method to solve the memory fragmentation caused by Windows GDI drawing is to independently extract the same operations (creation of memory DC, memory compatible bitmap) that need to be performed each time the window is drawn, and complete the initial creation work during the system startup process. Create a global static memory DC m_dcTemporary and a global static memory bitmap m_bitmapTemporary; during the entire life cycle of the system operation, use this memory DC and memory bitmap in every place that needs to be depicted, instead of frequently performing creation And the operation of destruction not only reduces the memory fragmentation caused by frequent creation, but also reduces the operation of each window drawing, reduces the time ...

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

A method for solving RAM (Random Access Memory) fragments generation during drawing of a Windows GDI (Graphics Device Interface) comprises the following steps: creating a class when the system is constructed, and creating a global static unique memory bitmap object and two global static unique memory equipment context objects; when the system starts initiation, defining all the window classes in the initiation memory bitmap objects and memory equipment context objects as derived classes, and performing painting interface operation in the OnPaint () method of the window classes through directly invoking the memory equipment context objects. According to the invention, when the WindowMFCGDI is adopted to perform GUI drawing, the memory equipment context objects and the memory bitmap objects, both of which are used during painting of each window, are not required to be created by the WindowMFCGDI; instead, the global unique memory equipment context objects and the memory bitmap object, both created in position, can be used, so that memory is not required to be created and allocated for each painting, CPU time occupied by frequent creating is shortened, and the stability and speed of system running are increased.

Description

technical field [0001] The invention relates to an improvement technology of a management method of a WINDOWS system memory. Background technique [0002] Windows is a graphical user interface operating system that displays all data, including text, as images on the screen. Windows makes all drawing-related operations into functions. GDI (Graphical Device Interface, GDI for short) is a set of functions for drawing operations that users can call. It is used to isolate the display device hardware from the programmer. Xu Niu The drawing environment is called Device Context (DC for short), which shields the characteristics of the display device and provides a unified drawing interface for programmers. [0003] In the embedded system, resources such as CPU frequency and memory size are strictly limited, and there are certain requirements for the real-time response of the system, and the requirements for the effect of the human-machine interface of the system are also getting hig...

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): G06F12/02
Inventor 程时宋陈秋龙黄东豹怀保胜
Owner HUIZHOU DESAY SV AUTOMOTIVE
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