Memory management method and device based on XR system, equipment and medium

By obtaining the current memory water level mark value in the XR system and triggering the memory dump operation when it is less than the preset value, the problem of inaccurate memory dump results in the existing technology is solved, and the accurate memory state is achieved when the XR system runs for failure Reflect and troubleshoot.

CN119440885APending Publication Date: 2025-02-14GEER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411441200.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing memory dump tool is only triggered after problems with the Android operating system, resulting in the generated memory dump result that the actual memory state at the time of the failure.

Method used

Based on the XR system, the current memory water level mark value is obtained and the memory dump operation is triggered when it is less than the preset value to obtain the operation result.

Benefits of technology

By triggering the memory dump operation in advance, it can accurately reflect the actual memory status when the XR system fails due to small memory capacity, and help developers effectively troubleshoot and analyze problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440885A_ABST
    Figure CN119440885A_ABST
Patent Text Reader

Abstract

The invention discloses a memory management method and device based on an XR system, equipment and a medium, and relates to the technical field of computers. The method comprises the following steps: for an XR system, acquiring a current memory water level mark value; and under the condition that the current memory water level mark value is smaller than a preset memory water level mark value, triggering a memory dump operation to obtain an operation result. According to the method, a new triggering mechanism for the memory dump operation is provided, and the problem that the triggering time of the memory dump operation is delayed is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a memory management method, apparatus, device and medium based on an XR system. Background Art

[0002] Currently, in the Android operating system, memory dump (also known as memory dump) is an important diagnostic tool. It can record the memory state of the Android operating system when a failure occurs to help developers analyze the problem.

[0003] However, the existing memory dump has a trigger time lag problem. Specifically, the memory dump is usually triggered only after a problem occurs in the Android operating system. For example, the memory dump is triggered when an important background process of the Android operating system is killed. However, the trigger time lag of the memory dump may cause the generated memory dump result to no longer accurately reflect the actual memory status when the Android operating system failure occurs.

[0004] Application Contents

[0005] One purpose of this application is to provide a new technical solution for memory management based on XR systems.

[0006] According to a first aspect of the present application, a memory management method based on an XR system is provided, the method comprising:

[0007] For XR system, get the current memory water mark value;

[0008] When the current memory water level mark value is less than the preset memory water level mark value, a memory dump operation is triggered to obtain an operation result.

[0009] Optionally, when the current memory water level mark value is less than a preset memory water level mark value, triggering a memory dump operation to obtain an operation result includes:

[0010] Get memory dump parameter requirements;

[0011] When the current memory water level mark value is less than the preset memory water level mark value, a memory dump operation is triggered according to the memory dump parameter requirement to obtain an operation result.

[0012] Optionally, the memory dump parameter requirements include: obtaining a buddyinfo data structure;

[0013] The method further includes: determining a memory fragmentation state according to the buddyinfo data structure.

[0014] Optionally, determining the memory fragmentation state according to the buddyinfo data structure includes at least one of the following:

[0015] First, determine the total free memory based on the buddyinfo data structure;

[0016] The second item is to determine the total free memory and the maximum continuous free memory according to the buddyinfo data structure, and determine that the memory is externally fragmented when the maximum continuous free memory is less than the total free memory;

[0017] The third item is to determine the total free memory and the maximum continuous free memory according to the buddyinfo data structure, and determine the fragmentation index according to the total free memory and the maximum continuous free memory.

[0018] Optionally, the memory dump parameter requirements include: obtaining ION memory status parameters;

[0019] The ION memory status parameters include at least one of the total amount of ION memory, allocation status, current status and distribution in the operating system.

[0020] Optionally, when the current memory water level mark value is less than a preset memory water level mark value, after triggering a memory dump operation to obtain an operation result, the method further includes:

[0021] The operation result is written into the log.

[0022] Optionally, before triggering a memory dump operation to obtain an operation result when the current memory water level mark value is less than a preset memory water level mark value, the method further includes:

[0023] Obtaining a first input for a first setting input interface;

[0024] In response to the first input, a preset memory watermark value is determined.

[0025] Optionally, before triggering a memory dump operation to obtain an operation result when the current memory water level mark value is less than a preset memory water level mark value, the method further includes:

[0026] Get the standard memory capacity value;

[0027] A preset memory water level mark value is determined according to the standard memory capacity value.

[0028] According to a second aspect of the present application, a memory management device based on an XR system is provided, the device comprising:

[0029] The acquisition module is used to obtain the current memory water level mark value;

[0030] The trigger module is used to trigger a memory dump operation to obtain an operation result when the current memory water level mark value is less than a preset memory water level mark value.

[0031] According to a third aspect of the present application, an XR device is provided, wherein the XR device includes the apparatus according to the second aspect; or,

[0032] The XR device includes a memory and a processor, the memory is used to store computer instructions, and the processor is used to call the computer instructions from the memory to execute the method as described in any one of the first aspects.

[0033] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the first aspects is implemented.

[0034] The present application provides a memory management method based on an XR system, the method comprising: for the XR system, obtaining the current memory water level mark value; when the current memory water level mark value is less than the preset memory water level mark value, triggering a memory dump operation to obtain an operation result. In this embodiment, for the XR system, when the current memory water level mark value is less than the preset memory water level mark value, it means that the XR system has the possibility of an operation failure due to too small a memory capacity, and at this time, a memory dump operation is triggered to obtain an operation result. In this way, it is possible to trigger a memory dump operation when there is a possibility of an operation failure in the XR system due to too small a memory capacity. Compared with the traditional technology in which the memory dump operation is only triggered after a problem occurs in the operating system, the memory dump operation is triggered in advance. That is, the present application provides a new triggering mechanism for a memory dump operation for the XR system, which avoids the problem of time lag in triggering the memory dump operation.

[0035] Other features and advantages of the present application will become apparent from the following detailed description of exemplary embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with the description, serve to explain the principles of the application.

[0037] Figure 1 A hardware configuration of an XR device for implementing a memory management method based on an XR system according to an embodiment of the present application is provided. Figure 1 ;

[0038] Figure 2 It is a flowchart of a memory management method based on an XR system provided in an embodiment of the present application;

[0039] Figure 3 It is a structural diagram of a memory management device based on an XR system provided according to an embodiment of the present application;

[0040] Figure 4 A hardware configuration of an XR device for implementing a memory management method based on an XR system according to an embodiment of the present application is provided. Figure 2 . DETAILED DESCRIPTION

[0041] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present application.

[0042] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.

[0043] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0044] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0045] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0046] Figure 1 A hardware configuration of an XR device for implementing a memory management method based on an XR system according to an embodiment of the present application is provided. Figure 1 Among them, the XR device runs the XR system, which is an operating system that is customized and improved based on the characteristics of the XR device. Among them, the traditional operating system includes the IOS operating system and the Android operating system.

[0047] The XR device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, and the like. The memory 1200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1300 may include, for example, a USB interface, a headphone interface, and the like. The communication device 1400 may be capable of wired or wireless communication, for example. The display device 1500 may be, for example, a liquid crystal display, a touch display, and the like. The input device 1600 may include, for example, a touch screen, a keyboard, and the like. The user may input / output voice information through the speaker 1700 and the microphone 1800.

[0048] Despite Figure 1 In the figure, multiple devices are shown for the XR device 1000, but the present application may only involve some of the devices, for example, the XR device 1000 only involves the memory 1200, the processor 1100 and the display device 1500.

[0049] In the embodiment of the present application, the memory 1200 of the XR device 1000 is used to store instructions, which are used to control the processor 1100 to execute the memory management method based on the XR system provided in the embodiment of the present application.

[0050] In the above description, the technician can design instructions according to the scheme disclosed in this application. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0051] It should be noted that for XR devices, applications therein often consume a large amount of memory when running, including graphics memory and other resources, and this high demand can easily cause XR devices to fail due to insufficient memory capacity. In this regard, the present application provides a memory management method for XR devices, namely, a memory management method based on an XR system.

[0052] This application provides a memory management method based on an XR system, which is applied to Figure 1 XR device shown.

[0053] like Figure 2 As shown, the memory management method based on the XR system provided in the present application includes the following steps S2100 and S2200.

[0054] Step S2100, for the XR system, obtain the current memory water level mark value.

[0055] In one embodiment of the present application, when an XR system improved based on an Android operating system is running in an XR device, the current memory water level mark value can be obtained by calling the lmkd process in the XR device.

[0056] The lmkd process is a daemon process in the Android operating system, and its full name is Low Memory Killer Daemon, which is translated into Chinese as "Low Memory Killer Daemon". Its main function is to monitor the memory status of the Android operating system.

[0057] In one embodiment of the present application, the specific implementation of the above step S2100 may be: obtaining the current memory water level mark value in real time.

[0058] In another embodiment of the present application, the specific implementation of the above step S2100 can also be: according to the set time interval, obtain the current memory water level mark value. The set time interval can be set based on experience. For example, the set time interval is 5 minutes.

[0059] Step S2200, when the current memory water level mark value is less than the preset memory water level mark value, trigger a memory dump operation to obtain an operation result.

[0060] The preset memory water level mark value is the minimum memory water level mark value at which the operating system may have a running failure due to insufficient memory capacity. The operating system running failure may be, for example, a critical process being killed.

[0061] Memory dump is an important diagnostic tool that records the complete state of the operating system's current memory, including running processes, allocated memory areas, memory fragmentation, etc. The memory dump operation is the operation of running a memory dump.

[0062] In this embodiment, for the XR system, when the current memory water level mark value is less than the preset memory water level mark value, it means that the XR system has the possibility of operating failure due to too small memory capacity, and the memory dump operation is triggered at this time to obtain the operation result. In this way, it can be achieved that when the XR system has the possibility of operating failure due to too small memory capacity, the memory dump operation is triggered. Compared with the traditional technology that the memory dump operation will only be triggered after the operating system has a problem, the memory dump operation is triggered in advance. That is, the present application provides a new triggering mechanism for the memory dump operation for the XR system, which avoids the problem of time lag in triggering the memory dump operation. On the basis that the operating system operation failure occurs very quickly, the operation result obtained based on the above step S2200 can accurately reflect the actual memory state when the operating system failure occurs, thereby helping developers to effectively troubleshoot and analyze problems in the operating system.

[0063] Corresponding to the above step S2200, when the current memory water level mark value is greater than or equal to the preset memory water level mark value, it means that the memory capacity is sufficient and the operation of the XR system is not affected. At this time, the above step S2100 is repeated.

[0064] In addition, in one embodiment of the present application, the specific implementation of the above steps S2100 and S2200 in the program can be: the lmkd process obtains the current memory water level mark value; the lmkd process reports the current memory water level mark value to the XR system; when the XR system determines that the current memory water level mark value is less than the preset memory water level mark value, the XR system reports to the AMS (Android Memory System) process that the current memory water level mark value is less than the preset memory water level mark value; the AMS process triggers a memory dump operation based on the current memory water level mark value reported by the XR system being less than the preset memory water level mark value.

[0065] The present application provides a memory management method based on an XR system, the method comprising: for the XR system, obtaining the current memory water level mark value; when the current memory water level mark value is less than the preset memory water level mark value, triggering a memory dump operation to obtain an operation result. In this embodiment, for the XR system, when the current memory water level mark value is less than the preset memory water level mark value, it means that the XR system has the possibility of an operation failure due to too small a memory capacity, and at this time, a memory dump operation is triggered to obtain an operation result. In this way, it is possible to trigger a memory dump operation when there is a possibility of an operation failure in the XR system due to too small a memory capacity. Compared with the traditional technology in which the memory dump operation is only triggered after a problem occurs in the operating system, the memory dump operation is triggered in advance. That is, the present application provides a new triggering mechanism for a memory dump operation for the XR system, which avoids the problem of time lag in triggering the memory dump operation.

[0066] In one embodiment of the present application, after the operation result is obtained based on the above step S2200, the operation result can be written into a dump file.

[0067] In another embodiment of the present application, in order to facilitate quick viewing by developers, the memory management method based on the XR system provided by the present application further includes the following step S2300 after the above step S2200.

[0068] Step S2300, write the operation result into the log.

[0069] In this embodiment, the operation results are written into the log for quick viewing by the developer.

[0070] In one embodiment of the present application, the specific implementation of the above step S2300 in the program may be: instructing to run a preset log code, wherein the log write object in the log code is the operation result obtained based on the above step S2200.

[0071] In one embodiment of the present application, the above step S2200 can be specifically implemented through the following steps S2210 and S2211.

[0072] Step S2210, obtaining memory dump parameter requirements.

[0073] Step S2211, when the current memory water level mark value is less than the preset memory water level mark value, trigger a memory dump operation according to the memory dump parameter requirement to obtain an operation result.

[0074] In this embodiment, the memory dump parameter requirement is used to describe the requirements for the parameters included in the finally generated operation result. In one embodiment of the present application, the memory dump parameter requirement in the above step S2210 is written into the XR device by the developer according to the requirements.

[0075] In another embodiment of the present application, the specific implementation of the above step S2210 can also be: obtaining a second input for the second setting input interface; and obtaining a memory dump parameter requirement in response to the second input. In this embodiment, according to the developer's own needs, the memory dump parameter that meets the developer's own needs can be input into the second input interface. This meets the developer's personalized needs.

[0076] After the memory dump parameter requirements are obtained based on the above step S2210, when the current memory water level mark value is less than the preset memory water level mark value, the operation result obtained after triggering the memory dump operation according to the memory dump parameter requirements includes the memory dump parameters required in the memory dump parameter requirements.

[0077] In one embodiment of the present application, the memory dump parameter requirements include: obtaining ION memory status parameters, wherein the ION memory status parameters include: at least one of the total amount of ION memory, allocation status, current status, and distribution in the operating system.

[0078] In this embodiment, the operation result obtained after executing the above step S2211 includes at least one of the total amount, allocation, current state and distribution of ION memory in the operating system. In this way, the memory management method based on the XR system provided by the present application can realize detailed recording of ION memory, and can provide developers with a comprehensive understanding of ION memory usage.

[0079] In one embodiment of the present application, the memory dump parameter requirement includes: obtaining a buddyinfo data structure. In this regard, the method provided by the present application also includes the following step S2400.

[0080] Step S2400: determining the memory fragmentation state according to the buddyinfo data structure.

[0081] In this embodiment, when the memory dump parameter requirement includes: obtaining a buddyinfo data structure, the memory dump operation may include: for the memory of the XR system, calling a buddy system algorithm for processing to obtain a buddyinfo data structure.

[0082] Among them, the buddyinfo data structure includes the following contents: Node information: the memory is divided into multiple nodes, each node consists of a group of CPUs and local memory. The buddyinfo data structure will display the information of each node, such as Node0, Node1, etc.; Zone information: the memory under each node can be divided into multiple zones, such as DMA, Normal, HighMem, etc. These zones have different characteristics and uses. For example, the DMA zone is usually used for DMA devices, the Normal zone is used for ordinary memory allocation, and the HighMem zone is used for high-end memory; Page information: the memory page is the smallest unit of physical memory, also called a page frame; Free memory block information: for each zone, the buddyinfo data structure will display the number of free memory blocks of different orders, which indicates the size and number of available continuous memory blocks in the zone in the current system.

[0083] Based on the above, we can see that the buddyinfo data structure can reflect the complete information of memory fragmentation. Therefore, the memory fragmentation status can be determined based on the buddyinfo data structure. This helps to accurately diagnose memory problems and optimize memory management.

[0084] In one embodiment of the present application, the above-mentioned step S2400 can be implemented according to at least one of the following steps S2410, S2411 and S2412.

[0085] Step S2410: determine the total free memory according to the buddyinfo data structure.

[0086] In this embodiment, the memory fragmentation state is represented by the total free memory. And the specific implementation of the above step S2410 can be: extracting the free memory block information from the buddyinfo data structure, and calculating the total free memory based on the free memory block information.

[0087] Step S2411, determining the total free memory and the maximum continuous free memory according to the buddyinfo data structure, and determining that the memory is externally fragmented when the maximum continuous free memory is smaller than the total free memory.

[0088] In this embodiment, the memory fragmentation state is represented by whether there is external fragmentation. Also, the method for determining the total free memory in the above step S2411 is the same as the specific implementation of the above step S2410, which will not be repeated here. The method for determining the maximum continuous free memory in the above step S2411 can be: extracting the free memory block information from the buddyinfo data structure, and finding the maximum continuous free memory based on the free memory block information.

[0089] After determining the total free memory and the maximum continuous free memory, determine the size relationship between the two. If the maximum continuous free memory is smaller than the total free memory, determine that the memory has external fragmentation. If the maximum continuous free memory is equal to the total free memory, determine that the memory does not have external fragmentation.

[0090] Step S2412: determining the total free memory and the maximum continuous free memory according to the buddyinfo data structure, and determining a fragmentation index according to the total free memory and the maximum continuous free memory.

[0091] In this embodiment, the memory fragmentation state is represented by a fragmentation index. Also, the method for determining the total free memory and the maximum continuous free memory in the above step S2412 is the same as the specific implementation of the above step S2411, which will not be repeated here.

[0092] In one embodiment of the present application, the fragmentation index in the above step S2412 may be determined according to the following formula.

[0093] Fragmentation index = (total free memory - maximum continuous free memory) / total free memory.

[0094] In one embodiment of the present application, the memory management method based on the XR system provided by the present application further includes the following steps S2220 and S2221 before the above-mentioned step S2200.

[0095] Step S2220: Acquire a first input for a first setting input interface.

[0096] Step S2221, in response to the first input, determining a preset memory water level mark value.

[0097] In this embodiment, the first setting input interface is used for the developer to input the preset memory water level mark value. The data input by the developer in the first setting input interface is identified as the first input. Further, the data corresponding to the first input is recorded as the preset memory water level mark value.

[0098] Among them, the developer can determine the preset memory water level mark value based on experience or experiments.

[0099] Based on the above steps S2220 and S2221, the present application provides a method for determining a preset memory water level mark value.

[0100] In another embodiment of the present application, the memory management method based on the XR system provided by the present application further includes the following steps S2230 and S2231 before the above-mentioned step S2200.

[0101] Step S2230, obtaining the standard memory capacity value.

[0102] Step S2231, determining a preset memory water level mark value according to the standard memory capacity value.

[0103] In the embodiment of the present application, the standard memory capacity value is the maximum available memory capacity value of the XR device, which can be determined according to the parameters of the XR device.

[0104] In one embodiment of the present application, the specific implementation of the above step S2231 may be: using a preset percentage of the standard memory capacity value as a preset memory water level mark value, wherein the preset percentage may be specifically 20%.

[0105] The present application also provides a memory management device 300 based on an XR system, such as Figure 3 As shown, the memory management device 300 based on the XR system includes:

[0106] An acquisition module 310 is used to acquire a current memory water level mark value for the XR system;

[0107] The trigger module 320 is used to trigger a memory dump operation to obtain an operation result when the current memory water level mark value is less than a preset memory water level mark value.

[0108] In one embodiment of the present application, the trigger module 320 is specifically configured to:

[0109] Get memory dump parameter requirements;

[0110] When the current memory water level mark value is less than the preset memory water level mark value, a memory dump operation is triggered according to the memory dump parameter requirement to obtain an operation result.

[0111] In one embodiment of the present application, the memory dump parameter requirements include: obtaining a buddyinfo data structure;

[0112] In this embodiment, the memory management device 300 based on the XR system provided by the present application further includes:

[0113] The first determining module is used to determine the memory fragmentation state according to the buddyinfo data structure.

[0114] In one embodiment of the present application, the determining module is specifically used to:

[0115] First, determine the total free memory based on the buddyinfo data structure;

[0116] The second item is to determine the total free memory and the maximum continuous free memory according to the buddyinfo data structure, and determine that the memory is externally fragmented when the maximum continuous free memory is less than the total free memory;

[0117] The third item is to determine the total free memory and the maximum continuous free memory according to the buddyinfo data structure, and determine the fragmentation index according to the total free memory and the maximum continuous free memory.

[0118] In one embodiment of the present application, the memory dump parameter requirement includes: obtaining ION memory status parameters;

[0119] The ION memory status parameters include at least one of the total amount of ION memory, allocation status, current status and distribution in the operating system.

[0120] In one embodiment of the present application, the memory management device 300 based on the XR system provided by the present application further includes:

[0121] The writing module is used to write the operation result into the log.

[0122] In one embodiment of the present application, the memory management device 300 based on the XR system provided by the present application further includes:

[0123] A second determining module, used to obtain a first input for a first setting input interface;

[0124] In response to the first input, a preset memory watermark value is determined.

[0125] In one embodiment of the present application, the memory management device 300 based on the XR system provided by the present application further includes:

[0126] A third determination module is used to obtain a standard memory capacity value;

[0127] A preset memory water level mark value is determined according to the standard memory capacity value.

[0128] The present application also provides an XR device 400, which includes any one of the XR system-based memory management devices 300 provided in the above device embodiments.

[0129] Or, if Figure 4 As shown, the XR device 400 includes a memory 410 and a processor 420, wherein the memory 410 is used to store computer instructions, and the processor 420 is used to call the computer instructions from the memory 410 to execute any one of the memory management methods based on the XR system provided in the above method embodiments.

[0130] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements any one of the XR system-based memory management methods provided in the above method embodiments.

[0131] The present application may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present application.

[0132] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0133] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0134] The computer program instructions for performing the operation of the present application can be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can 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 can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of a computer-readable program instruction to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute a computer-readable program instruction, thereby realizing various aspects of the present application.

[0135] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0136] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0137] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0138] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0139] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present application is defined by the appended claims.

Claims

1. A memory management method based on an XR system, characterized in that: The method comprises: For XR system, get the current memory water mark value; When the current memory water level mark value is less than the preset memory water level mark value, a memory dump operation is triggered to obtain an operation result.

2. The method according to claim 1, characterized in that When the current memory water level mark value is less than the preset memory water level mark value, triggering a memory dump operation to obtain an operation result includes: Get memory dump parameter requirements; When the current memory water level mark value is less than the preset memory water level mark value, a memory dump operation is triggered according to the memory dump parameter requirement to obtain an operation result.

3. The method according to claim 1, characterized in that The memory dump parameter requirements include: obtaining a buddyinfo data structure; The method further includes: determining a memory fragmentation state according to the buddyinfo data structure.

4. The method according to claim 3, characterized in that: Determining the memory fragmentation state according to the buddyinfo data structure includes at least one of the following: First, determine the total free memory based on the buddyinfo data structure; The second item is to determine the total free memory and the maximum continuous free memory according to the buddyinfo data structure, and determine that the memory is externally fragmented when the maximum continuous free memory is less than the total free memory; The third item is to determine the total free memory and the maximum continuous free memory according to the buddyinfo data structure, and determine the fragmentation index according to the total free memory and the maximum continuous free memory.

5. The method according to claim 2, characterized in that: The memory dump parameter requirements include: obtaining ION memory status parameters; The ION memory status parameters include at least one of the total amount of ION memory, allocation status, current status and distribution in the operating system.

6. The method according to claim 1, characterized in that In the case where the current memory water level mark value is less than the preset memory water level mark value, after triggering a memory dump operation to obtain an operation result, the method further includes: The operation result is written into the log.

7. The method according to claim 1, characterized in that Before triggering a memory dump operation to obtain an operation result when the current memory water level mark value is less than a preset memory water level mark value, the method further includes: Get the standard memory capacity value; A preset memory water level mark value is determined according to the standard memory capacity value.

8. A memory management device based on an XR system, characterized in that: The device comprises: The acquisition module is used to obtain the current memory water level mark value for the XR system; The trigger module is used to trigger a memory dump operation to obtain an operation result when the current memory water level mark value is less than a preset memory water level mark value.

9. An XR device, characterized in that: The XR device comprises the apparatus as claimed in claim 8; or, The XR device comprises a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call the computer instructions from the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, which implements the method according to any one of claims 1 to 7 when executed by a processor.