CN113268392A - Video memory monitoring method and device, readable medium and electronic equipment - Google Patents

Video memory monitoring method and device, readable medium and electronic equipment Download PDF

Info

Publication number
CN113268392A
CN113268392A CN202010093367.8A CN202010093367A CN113268392A CN 113268392 A CN113268392 A CN 113268392A CN 202010093367 A CN202010093367 A CN 202010093367A CN 113268392 A CN113268392 A CN 113268392A
Authority
CN
China
Prior art keywords
video memory
space
operation instruction
target operation
space usage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010093367.8A
Other languages
Chinese (zh)
Inventor
郑微
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010093367.8A priority Critical patent/CN113268392A/en
Publication of CN113268392A publication Critical patent/CN113268392A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a method and a device for monitoring video memory, a readable medium and electronic equipment, and relates to the technical field of electronic control, wherein the method comprises the following steps: the method comprises the steps of obtaining a target operation instruction aiming at the video memory, wherein the target operation instruction is used for triggering the space usage amount of the video memory to change, determining the space change amount of the video memory under the target operation instruction according to the target operation instruction, and updating and displaying the space usage amount of the video memory according to the space change amount. The method and the device directly acquire the target operation instruction aiming at the video memory and record the space variation of the video memory when the target operation instruction is executed, so that the space usage is updated and displayed in real time, the space usage of the video memory can be effectively monitored, and a user can timely find the abnormal condition of the video memory.

Description

Video memory monitoring method and device, readable medium and electronic equipment
Technical Field
The present disclosure relates to the field of electronic control technologies, and in particular, to a method and an apparatus for monitoring video memory, a readable medium, and an electronic device.
Background
With the increasing diversification of functions provided by terminal devices, the content that can be displayed on the screen of the terminal device is also becoming richer. In the process of displaying various contents, the terminal device changes the usage amount of the display memory along with the switching of the display contents. For example, when a mobile phone uses special effect processing such as a skin-care operation, a sticker operation, or a morphing operation, the special effect processing requires memory, and the amount of memory used increases. When the user finishes the special effect processing, the occupied video memory is released by the special effect processing, and the use amount of the video memory is reduced. In the operation process of the terminal device, abnormal conditions such as display memory leakage and display memory fluctuation may exist, which may affect the frame rate of the display content, so that the user is required to process the abnormal conditions of the display memory, but the user cannot timely know the use condition of the display memory at present, and thus cannot timely find the abnormal conditions of the display memory.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method for monitoring a video memory, where the method includes:
acquiring a target operation instruction for a video memory, wherein the target operation instruction is used for triggering the change of the space usage of the video memory;
determining a space change amount of the video memory under the target operation instruction according to the target operation instruction;
and updating and displaying the space usage of the video memory according to the space change.
In a second aspect, the present disclosure provides a device for monitoring a video memory, the device including:
the acquisition module is used for acquiring a target operation instruction aiming at the video memory, and the target operation instruction is used for triggering the space usage of the video memory to change;
the determining module is used for determining the space change amount of the video under the target operation instruction according to the target operation instruction;
and the updating module is used for updating and displaying the space usage of the video memory according to the space change.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method of the first aspect of the present disclosure.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of the method of the first aspect of the present disclosure.
Through the technical scheme, the method and the device for displaying the space usage amount of the video memory firstly acquire the target operation instruction for the video memory, wherein the target operation instruction can trigger the space usage amount of the video memory to change, then the space change amount of the video memory under the target operation instruction is determined according to the target operation instruction, finally the space usage amount of the video memory is updated according to the space change amount, and the updated space usage amount is displayed. The method and the device directly acquire the target operation instruction aiming at the video memory and record the space variation of the video memory when the target operation instruction is executed, so that the space usage is updated and displayed in real time, the space usage of the video memory can be effectively monitored, and a user can timely find the abnormal condition of the video memory.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
In the drawings:
FIG. 1 is a flow diagram illustrating a method for monitoring video memory in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating another method for monitoring video memory in accordance with an illustrative embodiment;
FIG. 3 is a flow diagram illustrating another method for monitoring video memory in accordance with an illustrative embodiment;
FIG. 4 is a flow diagram illustrating another method for monitoring video memory in accordance with an illustrative embodiment;
FIG. 5 is a flow diagram illustrating another method for monitoring video memory in accordance with an illustrative embodiment;
FIG. 6 is a block diagram illustrating a video memory monitoring apparatus in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating another apparatus for monitoring video memory in accordance with an illustrative embodiment;
FIG. 8 is a block diagram illustrating another apparatus for monitoring video memory in accordance with an exemplary embodiment;
fig. 9 is a block diagram illustrating another apparatus for monitoring video memory according to an example embodiment;
fig. 10 is a block diagram illustrating another apparatus for monitoring video memory according to an example embodiment;
fig. 11 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart illustrating a method for monitoring video memory according to an exemplary embodiment, where as shown in fig. 1, the method includes the following steps:
step 101, acquiring a target operation instruction for the video memory, wherein the target operation instruction is used for triggering the change of the space usage of the video memory.
For example, the various operation commands executed on the terminal may be divided into a target operation command for the video memory and an operation command not for the video memory. That is, when the terminal device executes the target special effect instruction, the space usage amount of the video memory may change. The target operation instruction may be a special effect operation instruction for the video memory in special effect processing. For example, a user may select a special effect process to be executed on a terminal device, the terminal device may provide a plurality of special effect processes to the user, and the user selects a specific special effect process according to different requirements. When the terminal device executes the special effect processing, a target operation instruction for performing operation (for example, operations such as applying for the video memory, releasing the video memory and the like) on the video memory of the terminal device in the special effect processing is acquired in real time. The special effect processing may include a plurality of special effect operation instructions, and the special effect operation instruction for the video memory of the terminal device in the plurality of special effect operation instructions may be used as the target operation instruction.
One way to obtain the target operation instruction may be: the special effect processing to which the target operation instruction belongs includes a corresponding resource packet, the resource packet includes materials, textures and the like for realizing the special effect processing, and also includes attribute information of each special effect operation instruction in the special effect processing, and the resource packet can be stored in the terminal device according to a format of a zip packet. The resource packet corresponding to the special effect processing can be analyzed to obtain the attribute information of each special effect operation instruction. And then determining whether the special effect operation instruction can operate aiming at the video memory according to the attribute information of the special effect operation instruction. And finally, determining the special effect operation instruction for operating the video memory as a target operation instruction. Another way to obtain the target operation instruction may be: when the special effect processing is executed, the execution process of a plurality of special effect operation instructions included in the special effect processing is monitored in real time, and if a certain special effect operation instruction is monitored to operate a video memory instruction, the special effect operation instruction is determined as a target operation instruction.
And 102, determining the space change amount of the video memory under the target operation instruction according to the target operation instruction.
And 103, updating and displaying the space usage of the video memory according to the space change.
For example, after the target operation command is determined, the spatial change amount under the target operation command may be displayed when the target operation command is determined to be executed according to the target operation command. For example, the execution process of the target operation command may be monitored, and if the target operation command applies for a space to the video memory, or the target operation command releases the space to the video memory, the space usage amount of the video memory is changed, and at this time, the space change amount of the video memory when the target operation command is executed is recorded. The space change amount may be understood as a change amount of a space usage amount of the video memory before the target operation command is executed and after the target operation command is executed. For example, before the target operation command is executed, the space usage of the video memory is 10.5M, and after the target operation command is executed, the space usage of the video memory is 12M, and then the space change amount is 1.5M. The space change amount may also be understood as the size of the space applied (or released) to the video memory during the execution of the target operation instruction. When the target operation command applies space to the video memory, the space change amount is a positive value, and when the target operation command releases space to the video memory, the space change amount is a negative value. For example, if a space of 5M is applied to the video memory during the execution of the target operation command, the amount of the space change is 5M. If 3M space is released to the video memory in the execution process of the target operation instruction, the space change amount is-3M.
Finally, in order to monitor the space usage of the video memory of the terminal device in real time, the space usage of the video memory can be updated according to the space change amount, and the updated space usage is displayed on a screen of the terminal device so that a user or a developer can monitor the video memory, and when the space usage of the video memory is abnormal (for example, the video memory leaks, the space usage fluctuates sharply, the space usage is excessive, and the like), the space usage can be found in time and processed correspondingly. Therefore, the frame rate of the display content is ensured, and the display content can be ensured to be complete and smooth.
In the operation process of the terminal device, if the target operation instruction is not executed, fixed contents such as a desktop and an application icon are displayed on the screen, the space usage of the video memory in the state is usually stable, and the space usage of the video memory in the state can be used as an initial value. Correspondingly, the specific implementation manner of updating the space usage amount may be: when the terminal device executes the target operation instruction for the first time, that is, executes step 101 to step 103 for the first time, the space change amount determined in step 102 and the initial value may be superimposed to obtain an updated space usage amount. Thereafter, each time step 101 to step 103 are executed, the amount of space usage may be updated by superimposing the amount of space usage determined in step 102 and the amount of space usage determined the last time step 101 to step 103 were executed.
It should be noted that, when the special effect processing is implemented on the terminal device, three elements are generally required: resources, filters, and features. The filter uses resources to render the texture, the feature is formed by connecting at least one filter, and is a minimum unit for external exposure and control, and is also a unit for combining rendering chains, and the rendering chains comprise a cascade of a plurality of features. In the embodiment given in the present disclosure, a special effect process may be understood as a combination of a plurality of features, where each special effect operation instruction in the special effect process corresponds to one feature, and then a target operation instruction is a feature for a video memory. For example: the special effect treatment can be animal special effect treatment, and comprises a filter operating instruction, a beautifying operating instruction, a 2D sticker operating instruction, a 3D sticker operating instruction, a deformation operating instruction and the like. The special effect processing may also be understood as a feature, where the feature includes multiple filters, and one special effect operation instruction corresponds to one filter, so that the target operation instruction is a filter for the video memory. For example, the special effects process may be a 3D sticker operation that includes multiple filters.
Specifically, the example is that a GPU (english: Graphics Processing Unit, chinese: Graphics processor) on the terminal device runs an Effect mechanism, which includes a Feature layer, an architecture layer, and a Render Core layer. And the Feature layer creates a rendering chain, and the Render Core layer directly applies for video memory from the bottom layer hardware and renders. After the special effect processing is completed, the Render Core layer releases the video memory previously applied. The monitoring method of the video memory provided by the embodiment can monitor the Render Core layer and directly acquire the operation instruction of the bottom layer hardware, so that the space usage of the video memory can be accurately and timely determined, and the purpose of effectively monitoring the space usage is achieved.
In summary, the present disclosure first obtains a target operation instruction for a video memory, where the target operation instruction can trigger a change of a space usage amount of the video memory, then determines a space change amount of the video memory under the target operation instruction according to the target operation instruction, and finally updates the space usage amount of the video memory according to the space change amount and displays the updated space usage amount. The method and the device directly acquire the target operation instruction aiming at the video memory and record the space variation of the video memory when the target operation instruction is executed, so that the space usage is updated and displayed in real time, the space usage of the video memory can be effectively monitored, and a user can timely find the abnormal condition of the video memory.
Specifically, the target operation instruction may be used to apply for the first space from the video memory, and accordingly, the space change amount is specifically the size of the first space. The target operation instruction may also be for releasing the second space to the video memory, and accordingly, the space change amount is specifically the size of the second space.
For example, the target operation instruction for the video memory may be divided into two types, one is to apply for the video memory, and the other is to release the video memory. The target operation instruction may be, for example, rendering a texture by using a corresponding resource, and typically includes three processes of texture creation, texture binding, and texture drawing. In the process of creating the texture, the target operation instruction creates the texture with the specified size, so that the size of the first space occupied by the created texture in the video memory can be recorded, and the size of the first space can be a positive value. After the texture binding and the texture drawing are performed, the target operation instruction also releases the previously created texture, so that the size of a second space occupied by the released texture in the video memory can be recorded, and the size of the second space can be a negative value. A plurality of target operation commands may be executed simultaneously on the terminal device, and therefore, the amount of change in space (the size of the first space, or the size of the second space) corresponding to each target operation command may be recorded. And then, determining the total space change amount according to the space change amount corresponding to each target operation instruction in the plurality of target operation instructions. If there is only one target operation command for applying for the first space from the video memory, the amount of space change is the size (positive value) of the first space. If there is only one target operation command for releasing the second space to the video memory, the amount of space change is the size (negative value) of the second space. If the target operation instruction for applying the first space to the video memory and the target operation instruction for releasing the second space to the video memory exist at the same time, the space change amount is the sum of the size of the first space and the size of the second space. For example, the size of the first space is 7M, the size of the second space is-5M, and the amount of spatial change is 2M.
Fig. 2 is a flowchart illustrating another method for monitoring video memory according to an exemplary embodiment, and as shown in fig. 2, the implementation manner of step 103 may be:
and step 1031, storing the sum of the current space usage and the space change as the updated space usage.
Step 1032, displaying the updated space usage.
Accordingly, when the space usage of the video memory is updated, the sum of the current space usage and the space change amount may be used as the updated space usage. In the operation process of the terminal device, under the state that other operations are not executed, the space usage of the video memory is usually a stable value, and the space usage can be used as an initial value. Then, when the terminal device executes the target operation instruction for the first time, that is, executes step 101 to step 103 for the first time, the space change amount determined in step 102 and the initial value may be superimposed to obtain the updated space usage amount. Thereafter, each time step 101 to step 103 are performed, the amount of space change determined in step 102 and the amount of space usage determined the last time step 101 to step 103 were performed may be superimposed to update the amount of space usage. Therefore, the purpose of monitoring the space usage of the video memory of the terminal equipment in real time is achieved.
Fig. 3 is a flowchart illustrating another method for monitoring video memory according to an exemplary embodiment, where as shown in fig. 3, after step 103, the method further includes:
and 104, if the updated space usage is larger than a preset usage threshold, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state.
In a specific application scenario, if the space usage of the video memory is too large, the terminal device may be jammed or even may be flashed, and therefore the space usage of the video memory needs to be monitored. Whether the space usage of the video memory is abnormal or not can be judged according to the space usage. For example, the relationship between the updated space usage and the preset usage threshold may be determined, and if the updated space usage is greater than the usage threshold, an alarm message may be sent to indicate that the video memory is in an abnormal state. The warning information can be displayed on a screen of the terminal equipment, can be sent out through a loudspeaker of the terminal equipment, can be sent out in a short message, mail or push mode, and can remind a user or a developer in time. The usage threshold may be preset, for example, the usage threshold may be set to 70% of the total space of the video memory of the terminal device, and the usage threshold may also be adjusted according to the specific requirements of the user.
Fig. 4 is a flowchart illustrating another method for monitoring video memory according to an exemplary embodiment, where as shown in fig. 4, the method further includes:
and 105, acquiring the execution times of the operation instruction aiming at the video memory within the preset time length.
And 106, if the execution times are greater than a preset time threshold, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state.
In another application scenario, the terminal device may include a plurality of operation commands for the video memory, and during execution of the operation commands, an exception may occur, for example, a certain operation command is repeatedly executed, and then the operation command repeatedly and continuously operates the video memory, for example, continuously creates a texture, and releases the texture, which may cause a drastic fluctuation in space usage. Therefore, a timer may be set to record the execution times of the operation instruction for the video memory within a preset time (e.g., 3s), and if the execution times is greater than a preset time threshold (e.g., 5 times) within the preset time, it indicates that the execution frequency of the operation instruction is too high, and may send an alarm message to indicate that the video memory is in an abnormal state. The warning information can be displayed on a screen of the terminal equipment, can be sent out through a loudspeaker of the terminal equipment, can be sent out in a short message, mail or push mode, and can remind a user or a developer in time.
Fig. 5 is a flowchart illustrating another method for monitoring video memory according to an exemplary embodiment, where as shown in fig. 5, the method further includes the following steps:
and step 107, if the usage amount of the first space is not matched with the usage amount of the second space, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state. The first space usage amount is the space usage amount of the video memory when the target operation instruction is triggered, and the second space usage amount is the space usage amount of the video memory when the target operation instruction is finished.
In another application scenario, an exception may occur during the execution of the target operation instruction, for example, the target operation instruction has a problem of memory leakage, that is, the size of a first space applied by the target operation instruction to the memory is different from the size of a second space released by the target operation instruction to the memory, so that the memory leakage is caused. Therefore, the space usage amount when the target operation instruction is triggered, that is, the first space usage amount, may be recorded. When the target operation instruction is ended (for example, the user cancels the target operation instruction), the space usage amount, namely the second space usage amount, is recorded again. If the first space usage amount is not matched with the second space usage amount, it is determined that the video memory leakage exists, and warning information can be sent out to indicate that the video memory is in an abnormal state. When the first space usage is equal to the second space usage, the first space usage is matched with the second space usage, and when the first space usage is not equal to the second space usage, the first space usage is not matched with the second space usage. The warning information can be displayed on a screen of the terminal equipment, can be sent out through a loudspeaker of the terminal equipment, can be sent out in a short message, mail or push mode, and can remind a user or a developer in time.
In summary, the present disclosure first obtains a target operation instruction for a video memory, where the target operation instruction can trigger a change of a space usage amount of the video memory, then determines a space change amount of the video memory under the target operation instruction according to the target operation instruction, and finally updates the space usage amount of the video memory according to the space change amount and displays the updated space usage amount. The method and the device directly acquire the target operation instruction aiming at the video memory and record the space variation of the video memory when the target operation instruction is executed, so that the space usage is updated and displayed in real time, the space usage of the video memory can be effectively monitored, and a user can timely find the abnormal condition of the video memory.
Fig. 6 is a block diagram illustrating a video memory monitoring apparatus according to an exemplary embodiment, and as shown in fig. 6, the apparatus 200 includes:
the obtaining module 201 is configured to obtain a target operation instruction for the video memory, where the target operation instruction is used to trigger a change in space usage of the video memory.
The determining module 202 is configured to determine, according to the target operation instruction, a spatial change amount of the video memory under the target operation instruction.
And the updating module 203 is configured to update and display the space usage amount of the video memory according to the space change amount.
Alternatively, the target operation instruction may be used to apply for the first space from the video memory, and accordingly, the space change amount is specifically the size of the first space. The target operation instruction may also be for releasing the second space to the video memory, and accordingly, the space change amount is specifically the size of the second space.
Fig. 7 is a block diagram illustrating another apparatus for monitoring video memory according to an exemplary embodiment, and as shown in fig. 7, the updating module 203 may include:
the update submodule 2031 is configured to store the sum of the current space usage and the space change amount as the updated space usage.
The display sub-module 2032 is configured to display the updated space usage.
Fig. 8 is a block diagram illustrating another apparatus for monitoring video memory according to an exemplary embodiment, and as shown in fig. 8, the apparatus 200 further includes:
the first warning module 204 is configured to, after updating and displaying the space usage amount of the video memory according to the space change amount, send warning information if the updated space usage amount is greater than a preset usage amount threshold, where the warning information is used to indicate that the video memory is in an abnormal state.
Fig. 9 is a block diagram illustrating another apparatus for monitoring video memory according to an exemplary embodiment, and as shown in fig. 9, the apparatus 200 further includes:
the counting module 205 is configured to obtain the execution times of the operation instruction for the video memory within a preset time duration.
The second warning module 206 is configured to send warning information if the execution time is greater than a preset time threshold, where the warning information is used to indicate that the video memory is in an abnormal state.
Fig. 10 is a block diagram illustrating another apparatus for monitoring video memory according to an exemplary embodiment, where the apparatus 200 shown in fig. 10 further includes:
the third warning module 207 is configured to send warning information if the first space usage amount is not matched with the second space usage amount, where the warning information is used to indicate that the video memory is in an abnormal state, the first space usage amount is a space usage amount of the video memory when the target operation instruction is triggered, and the second space usage amount is a space usage amount of the video memory when the target operation instruction is ended.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In summary, the present disclosure first obtains a target operation instruction for a video memory, where the target operation instruction can trigger a change of a space usage amount of the video memory, then determines a space change amount of the video memory under the target operation instruction according to the target operation instruction, and finally updates the space usage amount of the video memory according to the space change amount and displays the updated space usage amount. The method and the device directly acquire the target operation instruction aiming at the video memory and record the space variation of the video memory when the target operation instruction is executed, so that the space usage is updated and displayed in real time, the space usage of the video memory can be effectively monitored, and a user can timely find the abnormal condition of the video memory.
Referring now to FIG. 11, a block diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device (i.e., the execution subject of the monitoring method of the aforementioned video memory) in the embodiments of the present disclosure may be a terminal device, for example, including but not limited to a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 11, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 11 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the terminal devices, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a target operation instruction for a video memory, wherein the target operation instruction is used for triggering the change of the space usage of the video memory; determining a space change amount of the video memory under the target operation instruction according to the target operation instruction; and updating and displaying the space usage of the video memory according to the space change.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of a module does not in some cases constitute a limitation of the module itself, and for example, the acquiring module may also be described as a "module that acquires a target operation instruction".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides a method for monitoring a video memory, according to one or more embodiments of the present disclosure, including: acquiring a target operation instruction for a video memory, wherein the target operation instruction is used for triggering the change of the space usage of the video memory; determining a space change amount of the video memory under the target operation instruction according to the target operation instruction; and updating and displaying the space usage of the video memory according to the space change.
Example 2 provides the method of example 1, the target operation instruction is to apply for a first space from the video memory; the space change amount is specifically a size of the first space.
Example 3 provides the method of example 1, the target operation instruction to release a second space to the video memory; the space change amount is specifically a size of the second space.
Example 4 provides the method of example 1, wherein updating and displaying the amount of space usage of the video memory according to the amount of space usage according to the amount of space change, includes: taking the sum of the current space usage amount of the video memory and the space change amount as an updated space usage amount; displaying the updated space usage
Example 5 provides the method of any one of examples 1 to 4, further including, after the updating and displaying the amount of spatial usage of the video memory according to the amount of spatial change: and if the updated space usage is larger than a preset usage threshold, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state.
Example 6 provides any one of the methods of examples 1-4, further comprising, in accordance with one or more embodiments of the present disclosure: acquiring the execution times of the operation instruction aiming at the video memory within a preset time length; and if the execution times are greater than a preset time threshold, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state.
Example 7 provides any one of the methods of examples 1 to 4, further comprising, in accordance with one or more embodiments of the present disclosure: if the first space usage amount is not matched with the second space usage amount, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state; the first space usage amount is the space usage amount of the video memory when the target operation instruction is triggered, and the second space usage amount is the space usage amount of the video memory when the target operation instruction is finished.
Example 8 provides, in accordance with one or more embodiments of the present disclosure, an apparatus for monitoring video memory, the apparatus comprising: the acquisition module is used for acquiring a target operation instruction aiming at the video memory, and the target operation instruction is used for triggering the space usage of the video memory to change; the determining module is used for determining the space change amount of the video under the target operation instruction according to the target operation instruction; and the updating module is used for updating and displaying the space usage of the video memory according to the space change.
Example 9 provides a computer-readable medium having stored thereon a computer program that, when executed by a processing apparatus, implements the steps of the methods of examples 1-7, in accordance with one or more embodiments of the present disclosure.
Example 10 provides, in accordance with one or more embodiments of the present disclosure, an electronic device comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the methods of examples 1-7.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A method for monitoring video memory is characterized in that the method comprises the following steps:
acquiring a target operation instruction for a video memory, wherein the target operation instruction is used for triggering the change of the space usage of the video memory;
determining a space change amount of the video memory under the target operation instruction according to the target operation instruction;
and updating and displaying the space usage of the video memory according to the space change.
2. The method of claim 1,
the target operation instruction is used for applying for a first space from the video memory;
the space change amount is specifically a size of the first space.
3. The method of claim 1,
the target operation instruction is used for releasing a second space to the video memory;
the space change amount is specifically a size of the second space.
4. The method according to claim 1, wherein the updating and displaying the space usage amount of the video memory according to the space change amount comprises:
taking the sum of the current space usage amount of the video memory and the space change amount as an updated space usage amount;
displaying the updated space usage amount.
5. The method according to any one of claims 1-4, wherein after the updating and displaying the space usage amount of the video memory according to the space change amount, the method further comprises:
and if the updated space usage is larger than a preset usage threshold, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state.
6. The method according to any one of claims 1-4, further comprising:
acquiring the execution times of the operation instruction aiming at the video memory within a preset time length;
and if the execution times are greater than a preset time threshold, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state.
7. The method according to any one of claims 1-4, further comprising:
if the first space usage amount is not matched with the second space usage amount, sending alarm information, wherein the alarm information is used for indicating that the video memory is in an abnormal state; the first space usage amount is the space usage amount of the video memory when the target operation instruction is triggered, and the second space usage amount is the space usage amount of the video memory when the target operation instruction is finished.
8. A monitor device for video memory, the device comprising:
the acquisition module is used for acquiring a target operation instruction aiming at the video memory, and the target operation instruction is used for triggering the space usage of the video memory to change;
the determining module is used for determining the space change amount of the video under the target operation instruction according to the target operation instruction;
and the updating module is used for updating and displaying the space usage of the video memory according to the space change.
9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 7.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 7.
CN202010093367.8A 2020-02-14 2020-02-14 Video memory monitoring method and device, readable medium and electronic equipment Pending CN113268392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010093367.8A CN113268392A (en) 2020-02-14 2020-02-14 Video memory monitoring method and device, readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010093367.8A CN113268392A (en) 2020-02-14 2020-02-14 Video memory monitoring method and device, readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113268392A true CN113268392A (en) 2021-08-17

Family

ID=77227217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010093367.8A Pending CN113268392A (en) 2020-02-14 2020-02-14 Video memory monitoring method and device, readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113268392A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7870541B1 (en) * 2004-11-01 2011-01-11 Wind River Systems, Inc. Context tracing for software with a frame pointer and a stack pointer and with a stack pointer but without a frame pointer
CN104732139A (en) * 2015-02-04 2015-06-24 深圳市中兴移动通信有限公司 Internal storage monitoring method and terminal
CN105260294A (en) * 2015-11-16 2016-01-20 曙光信息产业(北京)有限公司 Monitoring method and device for memory occupied by application program
CN109857615A (en) * 2018-12-29 2019-06-07 北京奇安信科技有限公司 A kind of detection method and device of memory overflow

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7870541B1 (en) * 2004-11-01 2011-01-11 Wind River Systems, Inc. Context tracing for software with a frame pointer and a stack pointer and with a stack pointer but without a frame pointer
CN104732139A (en) * 2015-02-04 2015-06-24 深圳市中兴移动通信有限公司 Internal storage monitoring method and terminal
CN105260294A (en) * 2015-11-16 2016-01-20 曙光信息产业(北京)有限公司 Monitoring method and device for memory occupied by application program
CN109857615A (en) * 2018-12-29 2019-06-07 北京奇安信科技有限公司 A kind of detection method and device of memory overflow

Similar Documents

Publication Publication Date Title
CN113741755A (en) Information processing method and device, terminal and storage medium
CN111459364B (en) Icon updating method and device and electronic equipment
CN111309415B (en) User Interface (UI) information processing method and device of application program and electronic equipment
CN112988032B (en) Control display method and device and electronic equipment
CN113377366A (en) Control editing method, device, equipment, readable storage medium and product
CN114422482B (en) Message sending method and device, electronic equipment and storage medium
CN113535105B (en) Media file processing method, device, equipment, readable storage medium and product
CN112351221B (en) Image special effect processing method, device, electronic equipment and computer readable storage medium
CN110134905B (en) Page update display method, device, equipment and storage medium
CN113010300A (en) Image effect refreshing method and device, electronic equipment and computer readable storage medium
CN114187169B (en) Method, device, equipment and storage medium for generating video special effect package
CN111258582A (en) Window rendering method and device, computer equipment and storage medium
CN113709573B (en) Method, device, equipment and storage medium for configuring video special effects
CN113268392A (en) Video memory monitoring method and device, readable medium and electronic equipment
CN111290812B (en) Display method, device, terminal and storage medium of application control
CN114089891A (en) Display control method and device and electronic equipment
CN110795194B (en) Desktop display control method, device, terminal and storage medium
CN113138883A (en) Message processing method and device, storage medium and electronic equipment
CN111770385A (en) Card display method and device, electronic equipment and medium
CN113127101A (en) Application program control method, device, equipment and medium
CN111552705A (en) Data processing method and device based on chart, electronic equipment and medium
CN112822328A (en) Data display method and device and electronic equipment
CN111309323A (en) Parameter initialization method and device and electronic equipment
CN112328341B (en) Model display method, device, electronic equipment and storage medium
CN110069570B (en) Data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination