Electronic device, method, and non-transitory storage medium for performing garbage collection on basis of memory usage

WO2026164437A1PCT designated stage Publication Date: 2026-08-06SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SAMSUNG ELECTRONICS CO LTD
Filing Date
2026-01-26
Publication Date
2026-08-06

Smart Images

  • Figure KR2026001525_06082026_PF_FP_ABST
    Figure KR2026001525_06082026_PF_FP_ABST
Patent Text Reader

Abstract

The present document relates to an electronic device, method, and non-transitory storage medium for performing garbage collection on the basis of memory usage. According to an embodiment, the electronic device may comprise at least one processor and a memory for storing instructions. The instructions may cause, when executed individually or collectively by the at least one processor, the electronic device to: acquire information on memory usage from the memory at a designated period; check whether a condition for performing garbage collection (GC) for deleting at least one object from among objects stored in the memory is satisfied; identify a control level corresponding to the information on the memory usage on the basis of the condition being satisfied; adjust garbage collection parameters for garbage collection to be performed with designated garbage collector parameter values corresponding to the identified control level; and perform the garbage collection on the basis of the adjusted garbage collection parameters. Various other embodiments are also possible.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device, method, and non-transient storage medium for performing garbage collection based on memory usage

[0001] The present disclosure relates to an electronic device, a method, and a non-transient storage medium for performing garbage collection based on memory usage.

[0002] With the advancement of digital technology, electronic devices are being provided in various forms, such as smartphones, tablet PCs, or PDAs. Electronic devices are also being developed in wearable forms to enhance portability and user accessibility.

[0003] Electronic devices can provide various services through various applications and can execute applications using a designated platform. Processes for executing applications can be allocated to and operate within a memory area of ​​a fixed size. Electronic devices can perform garbage collection (GC) in advance to prevent failures when allocating processes to memory. Since garbage collection consumes the CPU resources of the electronic device, it may lead to runtime performance degradation depending on hardware performance; furthermore, while performing GC at an unnecessarily high frequency within the electronic device may offer advantages in terms of memory, it can result in increased power consumption.

[0004] The information described above may be provided as related art for the purpose of aiding understanding of the present disclosure. No claim or determination is made as to whether any of the foregoing may be applied as prior art related to the present disclosure.

[0005] For electronic devices, various parameters affecting garbage collection (GC) are determined as fixed values ​​at the time of zygote creation, and these fixed values ​​are applied equally to all forked applications. The same GC parameters are set for all electronic devices of the same model, and the conditions for performing GC are determined based on the set GC parameters.

[0006] Recent electronic devices are configured with GC parameter settings that allow for frequent GC execution to reclaim unnecessary memory as quickly as possible through fast GC timing, prioritizing performance impact from a memory perspective rather than considering memory usage per user. However, for users of electronic devices equipped with high-spec memory (e.g., 8GB or more), excessive GC execution for memory reclamation occurs even when memory is not being used extensively, which can lead to increased power consumption and resource usage.

[0007] The present disclosure aims to provide an electronic device, a method, and a non-transient storage medium for performing GC by adjusting GC parameters based on user-specific memory usage.

[0008] The technical problems to be solved in this disclosure are not limited to those mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art to which this disclosure pertains.

[0009] According to one embodiment of the present disclosure, an electronic device may include at least one processor and a memory for storing instructions.

[0010] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may be able to obtain information about memory usage from the memory at a specified period.

[0011] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may be able to check whether a condition for performing garbage collection (GC) to delete at least one object among the objects stored in the memory is satisfied.

[0012] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may identify a control level corresponding to information regarding memory usage based on whether the condition is satisfied.

[0013] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may be able to control garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the identified control level.

[0014] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may perform the garbage collection based on the controlled garbage collection parameters.

[0015] According to one embodiment, a method of operation in an electronic device may include an operation of obtaining information about memory usage from the memory of the electronic device at a specified period.

[0016] According to one embodiment, the method may include an operation to check whether a condition for performing garbage collection (GC) to delete at least one object among the objects stored in the memory is satisfied.

[0017] According to one embodiment, the method may include an operation of identifying a control level corresponding to information about memory usage based on whether the condition is satisfied.

[0018] According to one embodiment, the method may include the operation of adjusting garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the identified control level.

[0019] According to one embodiment, the method may include an operation of performing garbage collection based on the controlled garbage collection parameters.

[0020] According to one embodiment, in a non-transient storage medium storing one or more programs, the program may include an instruction that causes the electronic device to execute an operation of obtaining information about memory usage from the memory of the electronic device at a specified period when executed by at least one processor of the electronic device.

[0021] According to one embodiment, the program may include an instruction that causes the electronic device to perform an operation to check whether a condition for performing garbage collection (GC) to delete at least one object among the objects stored in the memory is satisfied when executed by at least one processor of the electronic device.

[0022] According to one embodiment, the program may include an instruction that, when executed by at least one processor of an electronic device, causes the electronic device to execute an operation of identifying a control level corresponding to information regarding memory usage based on the fulfillment of the condition.

[0023] According to one embodiment, the program may include an instruction that, when executed by at least one processor of an electronic device, causes the electronic device to perform an operation of adjusting garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the identified control level.

[0024] According to one embodiment, the program may include instructions that, when executed by at least one processor of the electronic device, cause the electronic device to perform an operation of performing garbage collection based on the controlled garbage collection parameters.

[0025] FIG. 1 is a block diagram of an electronic device in a network environment according to various embodiments.

[0026] FIG. 2 is a drawing showing an example of the configuration of an electronic device according to one embodiment.

[0027] FIG. 3 is a diagram showing an example of an allowed free byte of memory in an electronic device according to one embodiment.

[0028] FIG. 4 is a diagram showing an example of a designated control level table in an electronic device according to one embodiment.

[0029] FIG. 5 is a diagram showing an example of a method of operation in an electronic device according to one embodiment.

[0030] FIG. 6 is a diagram showing an example of a method of operation in an electronic device according to one embodiment.

[0031] FIG. 7 is a diagram illustrating an example of a method of operation in an electronic device according to one embodiment.

[0032] FIG. 8 is a diagram showing the comparison results of GC count values ​​measured by control level when performing GC based on garbage collection (GC) parameters adjusted in an electronic device according to one embodiment.

[0033] FIG. 9 is a diagram showing the comparison results of memory usage values ​​measured by control level when performing GC based on garbage collection (GC) parameters adjusted in an electronic device according to one embodiment.

[0034] FIG. 10 is a diagram showing the comparison results of power consumption measured by control level when performing GC based on garbage collection (GC) parameters adjusted in an electronic device according to one embodiment.

[0035] In relation to the description of the drawings, the same or similar reference numerals may be used for identical or similar components.

[0036] Hereinafter, embodiments of the present disclosure are described in detail with reference to the drawings so that those skilled in the art can easily implement them. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein. In relation to the description of the drawings, the same or similar reference numerals may be used for identical or similar components. Furthermore, in the drawings and related descriptions, descriptions of well-known functions and configurations may be omitted for clarity and brevity. The term "user" as used in the embodiments of the present disclosure may refer to a person using an electronic device or a device using an electronic device (e.g., an artificial intelligence electronic device).

[0037] FIG. 1 is a block diagram of an electronic device (101) in a network environment (100) according to various embodiments. Referring to FIG. 1, in the network environment (100), the electronic device (101) may communicate with an electronic device (102) through a first network (198) (e.g., a short-range wireless communication network) or may communicate with at least one of an electronic device (104) or a server (108) through a second network (199) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (101) may communicate with the electronic device (104) through a server (108). According to one embodiment, the electronic device (101) may include a processor (120), memory (130), input module (150), sound output module (155), display module (160), audio module (170), sensor module (176), interface (177), connection terminal (178), haptic module (179), camera module (180), power management module (188), battery (189), communication module (190), subscriber identification module (196), or antenna module (197). In some embodiments, at least one of these components (e.g., connection terminal (178)) may be omitted from the electronic device (101), or one or more other components may be added. In some embodiments, some of these components (e.g., sensor module (176), camera module (180), or antenna module (197)) may be integrated into a single component (e.g., display module (160)).

[0038] The processor (120) can control at least one other component (e.g., hardware or software component) of the electronic device (101) connected to the processor (120) by executing software (e.g., program (140)), for example, and can perform various data processing or operations. According to one embodiment, as at least part of the data processing or operations, the processor (120) can store commands or data received from other components (e.g., sensor module (176) or communication module (190)) in volatile memory (132), process the commands or data stored in volatile memory (132), and store the resulting data in non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., central processing unit or application processor) or an auxiliary processor (123) that can operate independently or together with it (e.g., graphics processing unit, neural processing unit (NPU), image signal processor, sensor hub processor, or communication processor). For example, if the electronic device (101) includes a main processor (121) and an auxiliary processor (123), the auxiliary processor (123) may be configured to use lower power than the main processor (121) or to be specialized for a designated function. The auxiliary processor (123) may be implemented separately from the main processor (121) or as part thereof.

[0039] The auxiliary processor (123) may control at least some of the functions or states associated with at least one component of the electronic device (101) (e.g., display module (160), sensor module (176), or communication module (190)) on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. According to one embodiment, the auxiliary processor (123) (e.g., image signal processor or communication processor) may be implemented as part of another functionally related component (e.g., camera module (180) or communication module (190)). According to one embodiment, the auxiliary processor (123) (e.g., neural network processing unit) may include a hardware structure specialized for processing an artificial intelligence model. The artificial intelligence model may be generated through machine learning. Such learning may be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or through a separate server (e.g., server (108)). The learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model may include a plurality of artificial neural network layers.An artificial neural network may be a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to the hardware structure, the artificial intelligence model may include a software structure, either additionally or substantially.

[0040] The memory (130) can store various data used by at least one component of the electronic device (101) (e.g., processor (120) or sensor module (176)). The data may include, for example, input data or output data for software (e.g., program (140)) and related commands. The memory (130) may include volatile memory (132) or non-volatile memory (134).

[0041] The program (140) may be stored as software in memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).

[0042] The input module (150) can receive commands or data to be used for a component of the electronic device (101) (e.g., processor (120)) from outside the electronic device (101) (e.g., user). The input module (150) may include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).

[0043] The sound output module (155) can output a sound signal to the outside of the electronic device (101). The sound output module (155) may include, for example, a speaker or a receiver. The speaker may be used for general purposes, such as multimedia playback or recording playback. The receiver may be used to receive incoming calls. According to one embodiment, the receiver may be implemented separately from the speaker or as part thereof.

[0044] The display module (160) can visually provide information to an external (e.g., user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling said device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of the force generated by said touch.

[0045] The audio module (170) can convert sound into an electrical signal or, conversely, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150) or output sound through the sound output module (155) or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphones) connected directly or wirelessly to the electronic device (101).

[0046] The sensor module (176) can detect the operating state of the electronic device (101) (e.g., power or temperature) or the external environmental state (e.g., user state) and generate an electrical signal or data value corresponding to the detected state. According to one embodiment, the sensor module (176) may include, for example, a gesture sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an accelerometer sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biosensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

[0047] The interface (177) may support one or more specified protocols that can be used for the electronic device (101) to be connected directly or wirelessly to an external electronic device (e.g., electronic device (102)). According to one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

[0048] The connection terminal (178) may include a connector through which the electronic device (101) can be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0049] The haptic module (179) can convert an electrical signal into a mechanical stimulus (e.g., vibration or movement) or an electrical stimulus that can be perceived by the user through tactile or kinesthetic senses. According to one embodiment, the haptic module (179) may include, for example, a motor, a piezoelectric element, or an electric stimulation device.

[0050] The camera module (180) can capture still images and video. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.

[0051] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented, for example, as at least part of a power management integrated circuit (PMIC).

[0052] The battery (189) can supply power to at least one component of the electronic device (101). According to one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0053] The communication module (190) can support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between an electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may include one or more communication processors that operate independently of the processor (120) (e.g., application processor) and support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., cellular communication module, short-range wireless communication module, or GNSS (global navigation satellite system) communication module) or a wired communication module (194) (e.g., LAN (local area network) communication module, or power line communication module). The corresponding communication module among these communication modules can communicate with an external electronic device (104) through a first network (198) (e.g., a short-range communication network such as Bluetooth, WiFi (wireless fidelity) direct, or IrDA (infrared data association)) or a second network (199) (e.g., a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules may be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can identify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) using subscriber information (e.g., International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module (196).

[0054] The wireless communication module (192) can support 5G networks and next-generation communication technologies following 4G networks, for example, new radio access technology. NR access technology can support high-speed transmission of high-capacity data (enhanced mobile broadband (eMBB)), minimization of terminal power and connection of multiple terminals (massive machine type communications (mMTC)), or high reliability and low latency (ultra-reliable and low-latency communications (URLLC)). The wireless communication module (192) can support a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate, for example. The wireless communication module (192) can support various technologies for securing performance in the high-frequency band, such as beamforming, massive MIMO (multiple-input and multiple-output), full-dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large-scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), external electronic device (e.g., electronic device (104)), or network system (e.g., second network (199)). According to one embodiment, the wireless communication module (192) can support a Peak data rate (e.g., 20 Gbps or more) for realizing eMBB, loss coverage (e.g., 164 dB or less) for realizing mMTC, or U-plane latency (e.g., downlink (DL) and uplink (UL) each 0.5 ms or less, or round trip 1 ms or less) for realizing URLLC.

[0055] An antenna module (197) can transmit a signal or power to or from an external source (e.g., an external electronic device). According to one embodiment, the antenna module (197) may include an antenna comprising a radiator made of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). According to one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as a first network (198) or a second network (199), may be selected from the plurality of antennas, for example, by a communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device through the selected at least one antenna. According to some embodiments, in addition to the radiator, other components (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as part of the antenna module (197).

[0056] According to various embodiments, the antenna module (197) may form a mmWave antenna module. According to one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent to a first surface (e.g., bottom surface) of the printed circuit board and capable of supporting a specified high frequency band (e.g., mmWave band), and a plurality of antennas (e.g., array antennas) disposed on or adjacent to a second surface (e.g., top surface or side surface) of the printed circuit board and capable of transmitting or receiving a signal of the specified high frequency band.

[0057] At least some of the above components can be connected to each other via a communication method between peripheral devices (e.g., bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)) and exchange signals (e.g., commands or data) with each other.

[0058] According to one embodiment, commands or data may be transmitted or received between an electronic device (101) and an external electronic device (104) through a server (108) connected to a second network (199). Each of the external electronic devices (102, or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations performed on the electronic device (101) may be performed on one or more of the external electronic devices (102, 104, or 108). For example, if the electronic device (101) needs to perform a function or service automatically or in response to a request from a user or another device, the electronic device (101) may request one or more external electronic devices to perform at least part of the function or service instead of performing the function or service itself or additionally. One or more external electronic devices that receive the above request may execute at least part of the requested function or service, or additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may provide the result as is or additionally processed as at least part of the response to the request. For this purpose, for example, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used. The electronic device (101) may provide ultra-low latency services using, for example, distributed computing or mobile edge computing. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server using machine learning and / or neural networks. According to one embodiment, the external electronic device (104) or the server (108) may be included within a second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.

[0059] FIG. 2 is a diagram showing an example of the configuration of an electronic device according to one embodiment, FIG. 3 is a diagram showing an example of an allowed free byte of memory that is a size that can be additionally allocated after garbage collection (GC) in an electronic device according to one embodiment, and FIG. 4 is a diagram showing an example of a designated control level table in an electronic device according to one embodiment.

[0060] Referring to FIG. 2, an electronic device (201) according to one embodiment (e.g., the electronic device (101) of FIG. 1) may include at least one processor (210), memory (220), display (230), and communication circuit (240). Not limited thereto, the electronic device (201) may be implemented identically or similarly to the electronic device (101) of FIG. 1 and may further include other components of the electronic device (101) of FIG. 1. In addition, the electronic device (201) may be configured to include other components necessary for the method of operation of the present disclosure.

[0061] According to one embodiment, an electronic device (201) may perform a garbage collection (GC) operation (hereinafter referred to as GC) to reclaim heap memory using a designated platform. Heap memory may refer to memory that stores objects (e.g., Java objects) allocated to a virtual machine (VM) area per process. Reclaiming heap memory may refer to an operation to detect and delete objects that are no longer needed per process among the objects stored to secure storage space in heap memory, specifically those with low usability (e.g., low probability of use) or unused objects with a usage rate below a designated value. An electronic device (201) according to one embodiment may determine the heap size and the value to be used for the garbage collection operation through a designated system property. Each application stored in memory may have its own heap.

[0062] According to one embodiment, the electronic device (201) can determine a predetermined control level corresponding to information about memory usage based on whether conditions for GC are met before performing GC, and can adjust garbage collection parameters for garbage collection to be performed with the specified garbage collector parameter values ​​of the determined control level.

[0063] According to one embodiment, when an event (e.g., trigger) for a memory allocation request occurs, the processor (210) of the electronic device (201) may perform memory allocation for a process of the requested application in a heap memory space within a specified maximum heap memory size (e.g., growth limit) that allows allocation.

[0064] According to one embodiment, the processor (210) checks a threshold to determine whether to start a garbage collection (GC) operation after memory allocation is performed, and can perform a garbage collection operation when the bytes allocated to heap memory (e.g., memory usage) reach or exceed the threshold. The processor (210) can recalculate and set a threshold for performing the next GC. According to one embodiment, the threshold may be a target footprint, which is the size of heap memory currently available to an application, and / or a garbage collection start byte (GC start byte). The processor (210) can adjust the heap by performing GC as the threshold increases up to the largest size (e.g., growth limit) that allows the heap to grow according to the application, and then check that an out of memory occurs when it can no longer grow further. For example, if the maximum allowed free byte (maxfree) is 8MB and the weight value for scaling the maximum allowed free byte, minimum allowed free byte, and target utilization is 3.0, the process has a target footprint value of 24MB at the time of application creation (e.g., at the time of fork), and the GC start byte (e.g., a condition for triggering GC) can be set to a value close to 24MB (e.g., a value close to the remaining bytes estimated from the target footprint value). For example, if 24MB of memory is allocated at the initial application entry, the allocated memory is greater than or exceeds the GC start byte value, so the processor (210) can automatically execute GC and can reset the threshold based on the currently allocated heap memory value as a condition for executing the next GC.According to one embodiment, the threshold for performing GC can be set to a value calculated as the allocated memory value + (allowed free byte * weight). As illustrated in FIG. 3, the allowed free byte can be selected and set from the minimum allowed free byte (minfree), the maximum allowed free byte (maxfree), or any value between the minimum and maximum (utilization%) based on the byte value allocated in the heap. Thus, if the memory value allocated in the heap is 24MB, the allowed free byte is selected as the maximum allowed free byte (maxfree), and the weight value for scaling the allowed free byte is 3.0, the target footprint can be set to 24MB + 8MB * 3.0 = 48MB. If the allowed free byte increases, the threshold can be set to a larger value. If the threshold is set to a larger value, the timing of GC execution is delayed, so that the objects available for deletion can be retained in memory until the next GC execution.

[0065] According to one embodiment, the processor (210) may set the timing of GC execution differently according to the user-specific memory usage environment before GC execution, collect memory usage to adjust the GC count, which is the number of times garbage collection (GC) is performed while the application is running, and adjust (e.g., change) GC parameters that affect GC execution based on the collected memory usage.

[0066] According to one embodiment, the processor (210) can check memory usage (e.g., calculate or collect) at specified intervals and accumulate information about the checked memory usage and store it in a specified file (e.g., a specified area). For example, the processor (210) can calculate memory usage using specified information (e.g., MemTotal, MemFree, Cached, RBIN free, RBIN cached information) through a specified API (application programming interface) (not shown).

[0067] According to one embodiment, the processor (210) can determine whether conditions for performing garbage collection (GC) are met based on the occurrence of a specified event. The specified event may be a cold reset indicating power on or off, a warm reset (e.g., platform reboot) which restarts the system and synchronizes data used by software to storage without cutting off power, or an event for applying a zygote process without a reboot. A zygote process may be defined as a parent process that can shorten the time an application runs by sharing code and memory information of a common virtual machine that runs before the application runs.

[0068] According to one embodiment, the processor (210) can determine that the condition for performing GC is satisfied based on the fact that the accumulated number of memory usage values ​​included in the information on memory usage obtained from the memory (220) exceeds a specified number.

[0069] According to one embodiment, the processor (210) can determine a control level (e.g., average value of accumulated memory usage / total memory value) based on the usage environment of the heap memory of the electronic device (201) by the user, based on the value of the currently accumulated memory usage in a designated file stored in memory (220). For example, the processor (210) can determine a control level corresponding to the currently accumulated memory usage value (e.g., % value) among the designated control levels (e.g., first control level to third control level) in a pre-specified control level table as shown in FIG. 4. For example, when the processor (210) uses a conservative algorithm (e.g., memory priority policy), it collects history information for control levels, and when at least one upper level exists in the collected history information, it checks GC parameter values ​​corresponding to the first control level (e.g., the highest level where the memory recovery rate is set highest, level 1) in a designated control level table, and applies the checked GC parameter values ​​to GC parameters for a GC operation to be performed, or it checks GC parameter values ​​corresponding to at least one upper level state identified in the collected history information and applies the checked GC parameter values ​​to GC parameters for a GC operation to be performed. For example, when the processor (210) uses an aggressive algorithm (e.g., GC count priority policy), it can calculate values ​​for collected memory usage (e.g., memory usage data) in intervals to determine the control level (e.g., level table value) that has the highest count (e.g., a count to determine which level the values ​​for collected memory usage are concentrated in), and apply GC parameters (e.g., heap parameter) for GC operations corresponding to the determined control level.Here, a conservative algorithm is an algorithm that prioritizes memory allocation by performing a lot of GC, and an aggressive algorithm is an algorithm that reduces unnecessary resource usage and power consumption by performing less GC.

[0070] The above GC parameters may include a first parameter (e.g., dalvik.vm.heapgrowthlimit) indicating the maximum size (growth limit) that the heap is allowed to grow, a second parameter (e.g., dalvik.vm.heapmaxfree) indicating the maximum allowed free bytes, a third parameter (e.g., dalvik.vm.heapminfree) indicating the minimum allowed free bytes, a fourth parameter (e.g., dalvik.vm.heapsize) indicating the maximum value the heap can grow to, a fifth parameter (e.g., dalvik.vm.heapstartsize) indicating the heap start size after process creation, and a sixth parameter (e.g., dalvik.vm.heaptargetutilization) indicating the ideal heap utilization (e.g., 90% utilization assuming 0.9). The first parameter (e.g., dalvik.vm.heapgrowthlimit) can be used by resetting the growth limit value to the maximum heap size value to which the heap can grow (e.g., dalvik.vm.heapsize). For example, a standard application has a maximum growth limit of 256 MB set by the first parameter (e.g., dalvik.vm.heapgrowthlimit), and an application with a large heap configuration can set the maximum heap size value (heap size) to 512 MB set by the fourth parameter (e.g., dalvik.vm.heapsize) as the max growth limit. When a new process is forked from a parent process (e.g., a zygote process), the initial value required for heap allocation can use the value of the fifth parameter (e.g., dalvik.vm.heapstartsize) (or a weighted value). The processor (210) is the fifth parameter (e.g., dalvik.vm.You can set thresholds (e.g., target footprint and GC start byte) for automatically running GC based on the heapstartsize value. You can update (e.g., reset) relevant thresholds for the next GC after GC based on the amount of currently allocated heap memory (allocated size) and some GC parameter values ​​(e.g., heapmaxfree, heapminfree, heaptargetutilization).

[0071] Referring to FIG. 4, a specified control level table may be pre-specified and stored in memory so that garbage collector parameter values ​​are mapped to control levels (e.g., first control level to third control level) set based on memory usage. The first level (e.g., level 1) is a level where memory usage is greater than or equal to a first ratio (e.g., a level of approximately 70% or 65% or more) or a second ratio (e.g., 50%), and the second parameter (e.g., dalvik.vm.heapmaxfree) value may be set to, for example, 8M, the third parameter (e.g., dalvik.vm.heapminfree) value may be set to, for example, 2M, the fourth parameter (e.g., dalvik.vm.heapsize) value may be set to, for example, 8M, and the sixth parameter (e.g., dalvik.vm.heaptargetutilization) value may be set to, for example, 0.75. A second level (e.g., level 2) is a level where memory usage is less than the second level (e.g., 50%) or a value between the first and second ratios (e.g., 50% or more and less than 65%), where the second parameter (e.g., dalvik.vm.heapmaxfree) value is set to, for example, 16M, the third parameter (e.g., dalvik.vm.heapminfree) value is set to, for example, 8M, the fourth parameter (e.g., dalvik.vm.heapsize) value is set to, for example, 8M, and the sixth parameter (e.g., dalvik.vm.heaptargetutilization) value is set to, for example, 0.6. The third control level (e.g., level 3) is a level where memory usage is less than the second ratio (e.g., 50%), where the second parameter (e.g., dalvik.vm.heapmaxfree) value is set to, for example, 32M, the third parameter (e.g., dalvik.vm.heapminfree) value is set to, for example, 8M, and the fourth parameter (e.g., dalvik.vm.The heapsize value may be set to, for example, 16M, and the sixth parameter value (e.g., dalvik.vm.heaptargetutilization) may be set to, for example, 0.5. The garbage collection parameter values ​​corresponding to the first control level may be pre-set to specified values ​​that increase the frequency of garbage collection to be performed and increase power consumption. The garbage collection parameter values ​​corresponding to the second control level or the third control level may be pre-set to specified values ​​that decrease the frequency of garbage collection to be performed and increase memory usage.

[0072] According to one embodiment, the processor (210) can determine a first control level if there is a memory usage value (e.g., memory usage history) of a specified first ratio (e.g., approximately 70%) or more relative to the total memory capacity (e.g., RAM size) within the memory list. According to one embodiment, the processor (210) can adjust (e.g., change) the GC parameters of the GC operation to be performed with specified GC parameter values ​​corresponding to the first control level in a pre-specified control table. For example, to determine the first control level, the processor (210) may check whether the memory usage value included in the memory list exceeds a specified number (e.g., 3), and this check condition may be omitted.

[0073] According to one embodiment, the processor (210) can check the average value of memory usage to check a second control level or a third control level if the memory usage value exceeds a specified number (e.g., 3) and there is no memory usage value that is greater than a certain percentage (e.g., approximately 70%).

[0074] According to one embodiment, the processor (210) can determine a second control level or a third control level based on the fact that there is no memory usage value (e.g., memory usage history) greater than a specified first ratio (e.g., 70%) relative to the total memory capacity, and by using information about memory usage accumulated in memory (220), obtain an average value of memory usage and identify that the average value is less than a specified second ratio (e.g., 50% or 65%) relative to the total memory capacity. The processor (210) can adjust (e.g., change) the GC parameters of the GC operation to be performed with specified GC parameter values ​​corresponding to the second control level or the third control level in a pre-specified control table. For example, if the memory capacity of the electronic device (e.g., total memory capacity) is a first capacity value (e.g., 8 gigabytes), the control level of the GC operation to be performed can be determined as a second control level, and if the memory capacity of the electronic device (e.g., total memory capacity) is a second capacity value (e.g., 12 gigabytes), the control level of the GC operation to be performed can be determined as a third control level.

[0075] According to one embodiment, the processor (210) can determine a first control level based on identifying that the average value is greater than or equal to a specified second ratio (e.g., 50% or 65%) relative to the total memory capacity. The processor (210) can adjust (e.g., change) the GC parameters of the GC operation to be performed with specified GC parameter values ​​corresponding to the first control level in a pre-specified control table.

[0076] According to one embodiment, the processor (210) can identify previously set control levels for each specified time interval based on information regarding memory usage accumulated in memory (220), and identify the control level most identified among the specified control levels as the control level for performing GC.

[0077] According to one embodiment, the processor (210) registers a process of a requested application (e.g., a task) with a task that performs GC (e.g., a HeapTaskDaemon), and when the registered process is run, it can perform actual GC operations based on adjusted GC parameters. By applying the adjusted GC parameters with determined GC parameter values, the processor (210) can perform optimized GC operations according to different heap memory usage environments for each user. The HeapTaskDaemon may be a background thread where GC is executed, and more CPU resources may be consumed by GC as the allocation amount increases.

[0078] According to one embodiment, when the GC execution is finished, the processor (210) may reset the threshold for performing the next GC based on the currently allocated memory size (memory size, memory byte). The threshold may decrease or increase depending on the allocated memory size after the next GC execution.

[0079] According to one embodiment, the processor (210) may be a hardware component (function) or a software element (program) comprising at least one component provided in the electronic device (201), such as a hardware module or a software module (e.g., an application program). According to one embodiment, the processor (210) may include, for example, one or more combinations of hardware, software, or firmware. The processor (210) may be configured to omit at least some of the components or to include additional components for performing the operation of the present disclosure in addition to the components.

[0080] According to one embodiment, memory (220) (e.g., memory (130) of FIG. 1) may store applications. Memory (220) may store applications (functions or programs) related to the operation of the present disclosure. Memory (220) may include heap memory that stores objects allocated in a virtual machine (VM) area per process. Memory (220) may store a task that performs GC (e.g., a heap task daemon (e.g., HeapTaskDaemon)). Memory (220) may store a pre-specified control level table. Memory (220) may store information about collected memory usage (e.g., a memory list that stores memory usage values).

[0081] According to one embodiment, the memory (220) may store various data generated during program execution, including a program used for functional operation (e.g., the program (140) of FIG. 1). For example, the memory (220) may include a program area and a data area (not shown). The program area may store relevant program information for operating the electronic device (201), such as an operating system (OS) that boots the electronic device (201) (e.g., the operating system (142) of FIG. 1). The data area (not shown) may store transmitted and / or received data and generated data according to various embodiments. Additionally, the memory (220) may be configured to include at least one storage medium among flash memory, a hard disk, a multimedia card micro type memory (e.g., secure digital (SD) or extreme digital (XD) memory), RAM, and ROM.

[0082] According to one embodiment, a display (230) (e.g., a display module (160) of FIG. 1) can display information related to the operation of the present disclosure. For example, the display (230) may display information related to GC operation (e.g., information indicating that GC parameter values ​​are being adjusted and messages indicating that the electronic device can be used in a better environment (e.g., notification / popup)) and / or information related to memory shortage. According to one embodiment, the display (230) may be implemented in the form of a touch screen. When the display (230) is implemented in the form of a touch screen with an input module, it may display various information generated according to the user's touch actions. According to one embodiment, the display (230) may be composed of at least one of an LCD (liquid crystal display), TFT-LCD (thin film transistor LCD), OLED (organic light emitting diodes), LED, AMOLED (active matrix organic LED), flexible display, and 3-dimensional display. Additionally, some of these displays may be configured to be transparent or light-transmitting so that the outside can be seen through them. This may be configured in the form of a transparent display including a TOLED (transparent OLED). In one embodiment According to the method, in addition to the display (230), other display modules (e.g., an extended display or a flexible display) may be included.

[0083] According to one embodiment, a communication circuit (240) (e.g., a communication module (190) of FIG. 1) may communicate with an external electronic device (e.g., an electronic device (102, 104) of FIG. 1, a server (108) of FIG. 1, or another user's electronic device). For example, the communication circuit (450) may receive a pre-specified control level table from an external electronic device and transmit information related to GC operation (e.g., information indicating that GC parameter values ​​are adjusted) and / or information related to memory shortage to the external electronic device. According to one embodiment, the communication circuit (450) may include a cellular module, a Wi-Fi (wireless-fidelity) module, a Bluetooth module, or a near field communication (NFC) module.

[0084] An electronic device according to one embodiment described above (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (201) of FIG. 2) may implement a software module (e.g., the program (140) of FIG. 1) related to the operation (e.g., GC operation) of the present disclosure. The memory of the electronic device (e.g., the memory (130) of FIG. 1 and / or the memory (220) of FIG. 2) may store instructions (e.g., instructions) to implement the software module. At least one processor (e.g., processor (120) of FIG. 1 and / or processor (210) of FIG. 2) can execute instructions stored in memory (e.g., memory (130) of FIG. 1 and / or memory (220) of FIG. 2) to implement a software module and can control hardware associated with the function of the software module (e.g., communication module (190) of FIG. 1 and / or communication circuit (240) of FIG. 2, display module (160) of FIG. 1 and / or display (230) of FIG. 2).

[0085] A software module of an electronic device (101, 201) according to one embodiment may be configured to include a kernel (or HAL), a framework (e.g., middleware (144) of FIG. 1), and an application (e.g., application (146) of FIG. 1). At least some of the software modules may be preloaded onto the electronic device (101, 201) or downloadable from a server (e.g., server (108)).

[0086] According to one embodiment, the kernel may include, for example, a system resource manager or a device driver, but may be configured to include other modules, not limited thereto. The system resource manager may perform control, allocation, or reclamation of system resources. The device driver may include, for example, a display driver, a camera driver, a Bluetooth driver, a shared memory driver, a USB driver, a keypad driver, a WIFI driver, an audio driver, or an IPC (inter-process communication) driver.

[0087] According to one embodiment, the framework may provide functions commonly required by the application, or provide various functions to the application through an application programming interface (API) (not shown) so that the application can efficiently use limited system resources within the electronic device (101, 201). The framework may include modules that form combinations of various functions of the components. The framework may provide modules specialized for each type of operating system to provide differentiated functions. The framework may dynamically delete some existing components or add new components.

[0088] According to one embodiment, the application may be configured to include an application (e.g., a module, a manager, or a program) related to GC operation. The application may include an application received from an external electronic device (e.g., a server (108) or an electronic device (102, 104)). According to one embodiment, the application may include a preloaded application or a third-party application downloadable from a server. The components of the software module and the names of the components according to the illustrated embodiments may vary depending on the type of operating system. According to one embodiment, at least a portion of the software module may be implemented as software, firmware, hardware, or a combination of at least two of these. At least a portion of the software module may be implemented (e.g., executed) by a processor (e.g., AP). At least a portion of the software module may include, for example, a module, a program, a routine, a set of instructions, or a process for performing at least one function.

[0089] As such, in one embodiment, the main components of an electronic device have been described through the electronic device (101) of FIG. 1 and the electronic device (201) of FIG. 2. However, in various embodiments, the components illustrated in FIG. 1 and 2 are not all essential components, and the electronic device (101, 201) may be implemented with more components than those illustrated, or with fewer components. Additionally, the positions of the main components of the electronic device (101, 201) described above in FIG. 1 and 2 may be changed according to various embodiments.

[0090] According to one embodiment, an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (201) of FIG. 2) may include at least one processor (e.g., the processor (120) of FIG. 1 and / or the processor (210) of FIG. 2)) and a memory for storing instructions (e.g., the memory (130) of FIG. 1 and / or the memory (220) of FIG. 2).

[0091] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may be able to obtain information about memory usage from the memory at a specified period.

[0092] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may be able to check whether a condition for performing garbage collection (GC) to delete at least one object among the objects stored in the memory is satisfied.

[0093] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may identify a control level corresponding to information regarding memory usage based on whether the condition is satisfied.

[0094] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may be able to control garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the identified control level.

[0095] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may perform the garbage collection based on the controlled garbage collection parameters.

[0096] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may identify a first control level based on identifying that there is a memory usage history of at least a specified first ratio relative to the total memory capacity in the information regarding the memory usage, and adjust the garbage collection parameters to be applied to the garbage collector to be performed with garbage collection parameter values ​​corresponding to the first control level.

[0097] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may identify previously set control levels for each specified time interval based on information regarding memory usage, and determine the control level most identified among the identified control levels as the control level for the garbage collector to be executed.

[0098] According to one embodiment, the garbage collector parameters may include at least one of a first parameter representing the largest size that allows the heap to grow, a second parameter representing the maximum allowable free bytes, a third parameter representing the minimum allowable free bytes, a fourth parameter representing the maximum value to which the heap can grow, a fifth parameter representing the heap starting size after process creation, or a sixth parameter representing the ideal heap utilization rate.

[0099] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may obtain an average value of the accumulated memory usage values ​​included in the information on the memory usage accumulated in the memory based on identifying that there is no memory usage history greater than a specified first ratio relative to the total memory capacity, identify a first control level based on identifying that the average value is greater than or equal to a specified second ratio relative to the total memory capacity, and adjust the garbage collection parameters to be applied to the garbage collection to be performed with the garbage collection parameter values ​​corresponding to the first control level.

[0100] According to one embodiment, among the garbage collection parameter values ​​corresponding to the first control level, the first parameter value and the second parameter value are designated as values ​​smaller than the first parameter value and the second parameter value of the second control level or the third control level, and among the garbage collection parameter values ​​corresponding to the first control level, the fourth parameter value may be designated as a value larger than the fourth parameter value of the second control level or the third control level.

[0101] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may identify the second control level based on identifying that there is no memory usage history greater than a specified first ratio relative to the total memory capacity and that the average value is less than the specified second ratio relative to the total memory capacity, and may adjust the garbage collector parameters to be applied to the garbage collector to be performed with garbage collector parameter values ​​corresponding to the second control level.

[0102] According to one embodiment, among the garbage collection parameter values ​​corresponding to the second control level, the first parameter value and the second parameter value are designated as values ​​greater than the first parameter value and the second parameter value of the first control level, and among the garbage collection parameter values ​​corresponding to the second control level, the fourth parameter value may be designated as a value smaller than the first control level value.

[0103] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may identify the third control level based on identifying that there is no memory usage history greater than a specified first ratio relative to the total memory capacity and that the average value is less than a specified third ratio relative to the total memory capacity, and may adjust the garbage collector parameters to be applied to the garbage collector to be performed with garbage collector parameter values ​​corresponding to the third control level.

[0104] According to one embodiment, the third ratio may be designated as the same ratio as the second ratio, or as a ratio greater than the second ratio and smaller than the first ratio.

[0105] According to one embodiment, the garbage collection parameter values ​​corresponding to the first control level may be set such that the frequency of garbage collection to be performed is increased compared to the garbage collection parameter values ​​corresponding to the second control level or the third control level.

[0106] According to one embodiment, the garbage collection parameter values ​​corresponding to the second control level may be set such that the frequency of garbage collection to be performed is reduced compared to the garbage collection parameter values ​​corresponding to the first control level.

[0107] According to one embodiment, the garbage collection parameter values ​​corresponding to the third control level may be set such that the frequency of garbage collection to be performed is reduced compared to the garbage collection parameter values ​​corresponding to the first control level.

[0108] When the above instructions are executed individually or collectively by the at least one processor, the electronic device may determine the second control level based on the total memory capacity of the electronic device being identified as a first capacity value, and determine the third control level based on the total memory capacity of the electronic device being identified as a second capacity value greater than the first capacity value.

[0109] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may be able to check whether the condition is satisfied based on the occurrence of a specified event.

[0110] According to one embodiment, the specified event may be a cold reset indicating power on or off, a warm reset indicating platform reboot, or an event for applying a zygote process without reboot.

[0111] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor, the electronic device may determine that the condition is satisfied based on the fact that the cumulative number of memory usage values ​​included in the information regarding memory usage exceeds a specified number.

[0112] FIG. 5 is a diagram illustrating an example of an operation method in an electronic device according to one embodiment. In the following embodiments, each operation may be performed sequentially, but is not necessarily performed sequentially. For example, the order of each operation may be changed, and at least two operations may be performed in parallel.

[0113] Referring to FIG. 5, an electronic device according to one embodiment (e.g., the electronic device of FIG. 1 (101) or the electronic device of FIG. 2 (201)) may, in operation 501, obtain (e.g., load) information regarding memory usage from memory (e.g., the memory of FIG. 1 or the memory of FIG. 2 (220)). The information regarding memory usage (e.g., memory list) includes accumulated memory usage values ​​(hereinafter referred to as memory usage values) collected by collecting the usage of memory in use at specified intervals, and may be stored accumulated in a specified file. For example, the specified file may be initialized when the electronic device is booting for the first time. When the electronic device is not booting for the first time, it may read the specified file line by line to the end to check the number of accumulated memory usage values.

[0114] In the 503 operation, an electronic device according to one embodiment may check whether conditions for performing garbage collection (GC) (hereinafter referred to as GC) are satisfied based on the occurrence of a specified event. An electronic device according to one embodiment may check that conditions for performing GC are satisfied based on the fact that the accumulated number of memory usage values ​​included in information regarding memory usage obtained from memory exceeds a specified number. As a result of the check, if the conditions for GC are satisfied, the electronic device performs the 505 operation, and if the conditions for GC are not satisfied, the electronic device may perform the 501 operation. During the 501 operation, the electronic device may perform the 505 operation by omitting the operation to check the accumulated number and the 503 operation to determine the next operation based on the accumulated number. Here, GC may refer to an operation to delete (e.g., clean up) at least one object among the objects allocated in the virtual machine (VM) area included in the heap memory of memory for each process.

[0115] In operation 505, an electronic device according to one embodiment may determine (e.g., identify) a pre-specified control level corresponding to information about memory usage based on the fact that conditions for GC are satisfied. The electronic device may determine (e.g., average value of accumulated memory usage / total memory value) a control level according to the usage environment of the electronic device's heap memory by the user based on the accumulated memory usage value. For example, the electronic device may determine (e.g., identify) a control level corresponding to the currently accumulated memory usage value (e.g., % value) among the control levels specified in a pre-specified control level table as shown in FIG. 4 (e.g., first control level to third control level).

[0116] In operation 507, an electronic device according to one embodiment may adjust GC parameters for GC to be performed with specified GC parameter values ​​corresponding to a determined control level. The GC parameters may include a first parameter indicating the largest size allowed for the heap to grow (e.g., dalvik.vm.heapgrowthlimit), a second parameter indicating the maximum allowed free bytes (e.g., dalvik.vm.heapmaxfree), a third parameter indicating the minimum allowed free bytes (e.g., dalvik.vm.heapminfree), a fourth parameter indicating the maximum value the heap can grow to (e.g., dalvik.vm.heapsize), a fifth parameter indicating the heap start size after process creation (e.g., dalvik.vm.heapstartsize), and a sixth parameter indicating the ideal heap utilization rate (e.g., dalvik.vm.heaptargetutilization).

[0117] 509 In operation, an electronic device according to one embodiment can perform GC based on adjusted GC parameters. According to one embodiment, the electronic device can perform GC based on adjusted GC parameters when the registered process is actually executed after the registration of a process (e.g., a task) of a registered application.

[0118] In operation 511, an electronic device according to one embodiment may check whether there is a termination request (e.g., whether an event for termination of the operation method has occurred). If, as a result of the check, there is a termination request (e.g., an event for termination has occurred), the electronic device may terminate the operation. If there is no termination request, the electronic device may perform operation 501. Here, the event for termination of the operation method may include at least one of, for example, an event identifying that the memory usage value is less than or equal to a specified number, an event in which the power of the electronic device is turned off (e.g., a cold reboot), or an event in which the platform is rebooted (e.g., a warm reboot or a warm reset).

[0119] FIG. 6 is a diagram illustrating an example of a method of operation in an electronic device according to one embodiment. In the following embodiments, each operation may be performed sequentially, but is not necessarily performed sequentially. For example, the order of each operation may be changed, and at least two operations may be performed in parallel. FIG. 6 is a flowchart for specifically explaining operations 501 through 507 of FIG. 5.

[0120] Referring to FIG. 6, an electronic device according to one embodiment (e.g., the electronic device of FIG. 1 (101) or the electronic device of FIG. 2 (201)) can obtain information about memory usage from a memory (e.g., the memory of FIG. 1 or the memory of FIG. 2 (220)) in operation 601.

[0121] In operation 603, an electronic device according to one embodiment may check whether the number of memory usage values ​​included in the information on acquired memory usage (e.g., the number of accumulated stored memory usage values) is less than or equal to a specified number (e.g., 3). If, as a result of the check, the number of memory usage values ​​is less than or equal to the specified number, the electronic device may terminate the operation. If, as a result of the check, the number of memory usage values ​​exceeds the specified number, the electronic device may perform operation 603.

[0122] In operation 605, an electronic device according to one embodiment can check whether there is a memory usage value (e.g., usage history) that is greater than or equal to a first ratio (e.g., 70%) relative to the total memory in information regarding memory usage. If, as a result of checking, there is a memory usage value greater than or equal to the first ratio (e.g., 70%), the electronic device can perform operation 613. If, as a result of checking, there is no memory usage value greater than or equal to the first ratio (e.g., 70%), the electronic device can perform operation 607.

[0123] In operation 607 (operation 605-No), an electronic device according to one embodiment can obtain (e.g., calculate or verify) the average value of memory usage values ​​included in information about usage.

[0124] In operation 609, an electronic device according to one embodiment can check whether the average value is less than a second ratio (e.g., 50%) relative to the total memory. If the result of the check is less than the second ratio (e.g., 50%), the electronic device performs operation 611, and if the second ratio (e.g., 50%) or greater, the electronic device can perform operation 613.

[0125] In operation 611 (609-Example), an electronic device according to one embodiment may determine (e.g., identify) the control level of the GC operation to be performed as a second control level or a third control level based on identifying that there is no memory usage value greater than or equal to a first ratio (e.g., approximately 70%) and less than a second ratio (e.g., 50%). The electronic device may adjust (e.g., change or set) the GC parameters of the GC operation to be performed to the GC parameter values ​​corresponding to the second control level or the third control level. For example, the electronic device may check the GC parameter values ​​corresponding to the second control level or the third control level in a pre-specified control level table. For example, if the memory capacity of the electronic device (e.g., total memory capacity) is a first capacity value (e.g., 8GB), the control level of the GC operation to be performed can be determined as a second control level, and if the memory capacity of the electronic device (e.g., total memory capacity) is a second capacity value (e.g., 12GB) which is greater than the first capacity value, the control level of the GC operation to be performed can be determined as a third control level. The garbage collection parameter values ​​corresponding to the second control level or the garbage collection parameter values ​​corresponding to the third control level may be pre-set in a control level table (e.g., the control level table of FIG. 4) specified with designated values ​​that reduce the frequency of garbage collection to be performed and increase memory usage. Among the garbage collection parameter values ​​corresponding to the second control level, the first parameter value and the second parameter value may be designated as values ​​greater than the first parameter value and the second parameter value of the first control level, and the fourth parameter value may be designated as values ​​smaller than the first control level value.Among the garbage collection parameter values ​​corresponding to the third control level, the first parameter value may be designated as a value greater than the first parameter value of the first control level or the second control level, and the second parameter value may be designated as a value greater than the second parameter value of the first control level. Among the garbage collection parameter values ​​corresponding to the third control level, the third parameter value may be designated as a value greater than the second control level value, and the fourth parameter value may be designated as a value smaller than the first control level value or the second control level value.

[0126] In operation 613 (605-Yes and 609-No), an electronic device according to one embodiment may determine (e.g., identify) the control level of the GC operation to be performed as the first control level if there is a memory usage value (e.g., memory usage history) greater than or equal to a specified first ratio (e.g., approximately 70%) or if there is a memory usage value greater than or equal to a specified first ratio (e.g., approximately 70%) and the average value is greater than or equal to a second ratio (e.g., approximately 50%). The electronic device may adjust (e.g., change or set) the GC parameters of the GC operation to be performed with GC parameter values ​​corresponding to the first control level. For example, the electronic device may check the GC parameter values ​​corresponding to the first control level in a pre-specified control level table. The garbage collection parameter values ​​corresponding to the first control level may be pre-set in a control level table (e.g., the control level table of FIG. 4) with specified values ​​that increase the frequency of garbage collection to be performed and increase power consumption. Among the garbage collection parameter values ​​corresponding to the first control level, the first parameter value and the second parameter value may be designated as values ​​smaller than the first parameter value and the second parameter value of the second control level or the third control level. Among the garbage collection parameter values ​​corresponding to the first control level, the fourth parameter value may be designated as a value larger than the fourth parameter value of the second control level or the third control level.

[0127] As described above, according to the operation method of FIGS. 5 and FIG. 6, the electronic device can perform optimized GC operation according to different heap memory usage environments for each user by applying GC parameters adjusted with determined GC parameter values.

[0128] As described above, after performing the operation method of FIGS. 5 and FIG. 6, the electronic device according to one embodiment registers the process (e.g., task) of the requested application with the HeapTaskDaemon, and when the registered process is run, it can perform actual GC operations based on the adjusted GC parameters. By applying the adjusted GC parameters with the determined GC parameter values, the electronic device can perform optimized GC operations according to different heap memory usage environments for each user.

[0129] As described above, an operation to adjust (e.g., change) GC parameters (e.g., heap parameters) may be performed when the user is not using the electronic device, such as in the operation method of FIGS. 5 and FIGS. For example, if there is no physical interaction with the user for 30 minutes, if there is no operating foreground service, or if there is no alarm to occur within tens of minutes, an operation to adjust (e.g., change) GC parameters may be performed through a reset.

[0130] FIG. 7 is a diagram illustrating an example of a method of operation in an electronic device according to one embodiment. In the following embodiments, each operation may be performed sequentially, but is not necessarily performed sequentially. For example, the order of each operation may be changed, and at least two operations may be performed in parallel. FIG. 7 is a flowchart for explaining operations 501 through 509 of FIG. 5 based on an aggressive algorithm.

[0131] Referring to FIG. 7, an electronic device according to one embodiment (e.g., the electronic device (101) of FIG. 1 or the electronic device (201) of FIG. 2) can obtain information about memory usage from a memory (e.g., the memory (130) of FIG. 1 or the memory (220) of FIG. 2).

[0132] In operation 703, the electronic device can identify previously set control levels for specified time intervals based on information about memory usage.

[0133] In operation 705, the electronic device may determine the most identified control level among the specified control levels as the control level for performing GC. In operation 707, the electronic device may adjust the GC parameters for performing GC to the specified GC parameter values ​​corresponding to the determined control level.

[0134] In operation 709, the electronic device can perform GC based on the adjusted GC parameters.

[0135] FIG. 8 is a diagram showing the comparison results of GC count values ​​measured by control level when performing GC based on GC parameters adjusted in an electronic device according to one embodiment, FIG. 9 is a diagram showing the comparison results of memory usage values ​​measured by control level when performing GC based on GC parameters adjusted in an electronic device according to one embodiment, and FIG. 10 is a diagram showing the comparison results of power consumption amounts measured by control level when performing GC based on GC parameters adjusted in an electronic device according to one embodiment.

[0136] The present disclosure allows for the comparison of GC counts, memory usage, and power consumption between control levels by changing heap parameters, for example, by setting the memory capacity of an electronic device to a first capacity value (e.g., 8GB) of the total memory capacity of the electronic device, performing a test that randomly executes applications, comparing the GC count values ​​of major processes, and verifying the measured memory usage. For example, as shown in FIG. 8, when comparing the GC counts executed during testing of major processes among several processes running in the electronic device, it can be confirmed that the GC counts of the third control level (e.g., level 3) (e.g., System_server GC count: approximately 129, Systemui GC count: approximately 19, and launcher GC count: approximately 57) are reduced compared to the GC counts of the first control level (e.g., level 1) (e.g., System_server GC count: approximately 543, Systemui GC count: approximately 57, and launcher GC count: approximately 220). For example, as shown in FIG. 9, when comparing memory usage, the memory usage (RAM usage) of the third control level (e.g., approximately 60%) may be increased compared to the memory usage of the first control level (e.g., 51%). As shown in FIG. 10, when comparing power consumption, the power consumption of the third control level (e.g., approximately 750 mA) may be decreased compared to the power consumption of the first control level (e.g., approximately 1080 mA).

[0137] In the present disclosure, if the electronic device can change the runtime code, it can check memory usage for each process at a specified period and accumulate and store memory usage values, and based on the memory usage values ​​for each process accumulated and stored in memory, it can adjust (e.g., change) GC parameters for each process at runtime.

[0138] In the present disclosure, the electronic device can reduce the number of GCs (e.g., GC count) and reduce power consumption by adjusting GC parameters (e.g., heap parameters) according to the accumulated memory usage value. In addition to the accumulated memory usage value, the electronic device of the present disclosure may also adjust GC parameters (e.g., heap parameters) based, for example, on the GC count per process.

[0139] According to one embodiment, a method of operation in an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (201) of FIG. 2) may include an operation of obtaining information about memory usage from the memory of the electronic device (e.g., the memory (130) of FIG. 1 and / or the memory (220) of FIG. 2) at specified intervals.

[0140] According to one embodiment, the method may include an operation to check whether a condition for performing garbage collection (GC) to delete at least one object among the objects stored in the memory is satisfied.

[0141] According to one embodiment, the method may include an operation of identifying a control level corresponding to information about memory usage based on whether the condition is satisfied.

[0142] According to one embodiment, the method may include the operation of adjusting garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the identified control level.

[0143] According to one embodiment, the method may include an operation of performing garbage collection based on the controlled garbage collection parameters.

[0144] According to one embodiment, the operation of identifying a control level corresponding to information regarding memory usage may include identifying a first control level based on identifying that there is a memory usage history of at least a specified first ratio relative to the total memory capacity in the information regarding memory usage.

[0145] According to one embodiment, the method may further include, based on information regarding memory usage, an operation of identifying a previously set control level for each specified time interval and an operation of determining the control level most frequently identified among the identified control levels as the control level for the garbage collector to be performed.

[0146] According to one embodiment, the operation of adjusting the garbage collection parameters for the garbage collection to be performed may include the operation of adjusting the garbage collection parameters to be applied to the garbage collector to be performed with garbage collection parameter values ​​corresponding to the first control level.

[0147] According to one embodiment, the garbage collector parameters may include at least one of a first parameter representing the largest size that allows the heap to grow, a second parameter representing the maximum allowable free bytes, a third parameter representing the minimum allowable free bytes, a fourth parameter representing the maximum value to which the heap can grow, a fifth parameter representing the heap starting size after process creation, or a sixth parameter representing the ideal heap utilization rate.

[0148] According to one embodiment, the operation of identifying a control level corresponding to information regarding memory usage may include the operation of obtaining an average value of the accumulated memory usage values ​​included in the information regarding memory usage accumulated in the memory based on identifying that there is no memory usage history of at least a specified first ratio relative to the total memory capacity, and the operation of identifying a first control level based on identifying that the average value is at least a specified second ratio relative to the total memory capacity.

[0149] According to one embodiment, the operation of adjusting the garbage collection parameters for the garbage collection to be performed may include the operation of adjusting the garbage collection parameters to be applied to the garbage collection to be performed with the garbage collection parameter values ​​corresponding to the first control level.

[0150] According to one embodiment, the operation of identifying a control level corresponding to information on memory usage may include identifying a second control level based on identifying that there is no memory usage history greater than a specified first ratio relative to the total memory capacity and that the average value is less than the specified second ratio relative to the total memory capacity.

[0151] According to one embodiment, the operation of adjusting the garbage collection parameters for the garbage collection to be performed may include the operation of adjusting the garbage collector parameters to be applied to the garbage collector to be performed with garbage collector parameter values ​​corresponding to the second control level.

[0152] According to one embodiment, the operation of identifying a control level corresponding to information on memory usage may include identifying a third control level based on identifying that there is no memory usage history greater than a specified first ratio relative to the total memory capacity and that the average value is less than a specified third ratio relative to the total memory capacity.

[0153] According to one embodiment, the operation of adjusting the garbage collection parameters for the garbage collection to be performed may include the operation of adjusting the garbage collector parameters to be applied to the garbage collector to be performed with garbage collector parameter values ​​corresponding to the third control level.

[0154] According to one embodiment, the third ratio may be designated as the same ratio as the second ratio, or as a ratio greater than the second ratio and smaller than the first ratio.

[0155] According to one embodiment, the garbage collection parameter values ​​corresponding to the first control level may be set such that the frequency of garbage collection to be performed is increased compared to the garbage collection parameter values ​​corresponding to the second control level or the third control level.

[0156] According to one embodiment, the garbage collection parameter values ​​corresponding to the second control level may be set such that the frequency of garbage collection to be performed is reduced compared to the garbage collection parameter values ​​corresponding to the first control level.

[0157] According to one embodiment, the garbage collection parameter values ​​corresponding to the third control level may be set such that the frequency of garbage collection to be performed is reduced compared to the garbage collection parameter values ​​corresponding to the first control level.

[0158] According to one embodiment, the operation of checking whether the condition for performing the garbage collection (GC) is satisfied can be performed based on the occurrence of a specified event.

[0159] According to one embodiment, the specified event may be a cold reset indicating power on or off, a warm reset indicating platform reboot, or an event for applying a zygote process without reboot.

[0160] According to one embodiment, in a non-transient storage medium storing one or more programs, the program may include an instruction that, when executed by at least one processor (e.g., processor (120) of FIG. 1 and / or processor (210) of FIG. 2) of an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (201) of FIG. 2), causes the electronic device to execute an operation of obtaining information about memory usage, including memory usage values ​​accumulated over a specified period, from the memory of the electronic device (e.g., memory (130) of FIG. 1 and / or memory (220) of FIG. 2).

[0161] According to one embodiment, the program may include an instruction that causes the electronic device to perform an operation to check whether a condition for performing garbage collection (GC) to delete at least one object among the objects stored in the memory is satisfied when executed by at least one processor of the electronic device.

[0162] According to one embodiment, the program may include an instruction that, when executed by at least one processor of an electronic device, causes the electronic device to execute an operation of identifying a control level corresponding to information regarding memory usage based on the fulfillment of the condition.

[0163] According to one embodiment, the program may include an instruction that, when executed by at least one processor of an electronic device, causes the electronic device to perform an operation of adjusting garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the identified control level.

[0164] According to one embodiment, the program may include instructions that, when executed by at least one processor of the electronic device, cause the electronic device to perform an operation of performing garbage collection based on the controlled garbage collection parameters.

[0165] According to the present disclosure, memory usage is collected for each user based on the electronic device and the method of operation of the electronic device, and GC parameters can be adjusted adaptively according to the user's memory usage environment to enable optimized GC execution based on the collected memory usage values. Accordingly, different GC parameters can be set between users who use little memory and users who use a lot, thereby allowing the timing of GC execution to be set differently. By adjusting GC parameters according to the memory usage environment for each user, the GC count within the electronic device can be controlled, and by adjusting GC parameters to perform GC at a low frequency, unnecessary resources can be reduced and power consumption can be reduced. In addition, various effects identified directly or indirectly through the present disclosure may be provided. The effects obtainable from the present disclosure are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art to which the present disclosure belongs from the description below.

[0166] Furthermore, the embodiments disclosed in this document are presented for the purpose of explaining and understanding the disclosed technical content and are not intended to limit the scope of the technology described in this document. Accordingly, the scope of this document should be interpreted to include all modifications or various other embodiments based on the technical concept of this document.

[0167] The electronic device according to the various embodiments disclosed in this document may be of various forms. The electronic device may include, for example, a portable communication device (e.g., a smartphone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a consumer electronics device. The electronic device according to the embodiments of this document is not limited to the devices described above.

[0168] The various embodiments of this document and the terms used therein are not intended to limit the technical features described in this document to specific embodiments, and should be understood to include various modifications, equivalents, or substitutions of said embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of said items unless the relevant context clearly indicates otherwise. In this document, phrases such as "A or B," "at least one of A and B," "at least one of A or B," "A, B or C," "at least one of A, B and C," and "at least one of A, B, or C" may each include any one of the items listed together in the corresponding phrase, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used simply to distinguish said components from other said components and do not limit said components in any other aspect (e.g., importance or order). Where any (e.g., 1st) component is referred to as “coupled” or “connected” to another (e.g., 2nd) component, with or without the terms “functionally” or “communicationly,” it means that said any component may be connected to said other component directly (e.g., via a wire), wirelessly, or through a third component.

[0169] The term “module” as used in the various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit, for example. A module may be a component formed integrally, or a minimum unit of said component or a part thereof that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).

[0170] Various embodiments of the present document may be implemented as software (e.g., program (140)) comprising one or more instructions stored in a storage medium (e.g., internal memory (136) or external memory (138)) readable by a machine (e.g., electronic device (101)). For example, a processor (e.g., processor (120)) of the machine (e.g., electronic device (101)) may call at least one of the one or more instructions stored in the storage medium and execute it. This enables the machine to be operated to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code that can be executed by an interpreter. The storage medium readable by the machine may be provided in the form of a non-transitory storage medium. Here, 'non-transient' simply means that the storage medium is a tangible device and does not contain a signal (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently and cases where it is stored temporarily.

[0171] According to one embodiment, the method according to the various embodiments disclosed herein may be provided by being included in a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)) or an application store (e.g., Play Store). TM It can be distributed online (e.g., downloaded or uploaded) through ) or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily created on a device-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.

[0172] According to various embodiments, each component (e.g., module or program) of the components described above may include a singular or multiple entities, and some of the multiple entities may be separated and placed in other components. According to various embodiments, one or more of the components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Generally or additionally, multiple components (e.g., module or program) may be integrated into a single component. In this case, the integrated component may perform one or more functions of each of the multiple components in the same or similar manner as those performed by the corresponding component among the multiple components prior to integration. According to various embodiments, operations performed by the module, program, or other components may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.

Claims

1. In an electronic device (101, 201), At least one processor (120, 210); and It includes memory (130, 220) for storing instructions, When the above instructions are executed individually or collectively by the at least one processor, the electronic device: Information regarding memory usage is obtained from the memory at a specified period, and Check whether the conditions for performing garbage collection (GC) to delete at least one object among the objects stored in the memory are satisfied, and Based on the satisfaction of the above conditions, a control level corresponding to the information on the memory usage is identified, and Adjusting garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the above-identified control level, and An electronic device that performs garbage collection based on the above-mentioned controlled garbage collection parameters.

2. In paragraph 1, when the instructions are executed individually or collectively by the at least one processor, the electronic device: Based on identifying that there is a memory usage history of more than the first ratio specified in the information regarding the memory usage above, a first control level is determined, and An electronic device that controls the garbage collection parameters to be applied to the garbage collector to be performed with garbage collection parameter values ​​corresponding to the first control level.

3. In paragraph 1 or 2, when the instructions are executed individually or collectively by the at least one processor, the electronic device: Based on the information regarding the memory usage above, identify the previously set control level for each specified time interval, and The control level most frequently identified among the above identified control levels is determined as the control level for the garbage collector to be performed, and An electronic device comprising at least one of the above garbage collector parameters, wherein the parameters include a first parameter representing the largest size allowed for the heap to grow, a second parameter representing the maximum allowed free bytes, a third parameter representing the minimum allowed free bytes, a fourth parameter representing the maximum value to which the heap can grow, a fifth parameter representing the heap starting size after process creation, or a sixth parameter representing the ideal heap utilization rate.

4. In any one of claims 1 to 3, when the instructions are executed individually or collectively by the at least one processor, the electronic device: Based on identifying that there is no memory usage history exceeding the specified first ratio in the information regarding memory usage, the average value of the accumulated memory usage values ​​included in the information regarding memory usage is obtained, and Based on identifying that the above average value is greater than or equal to a specified second ratio relative to the total memory capacity, the first control level is identified, and An electronic device that controls the garbage collection parameters to be applied to the garbage collection to be performed using the garbage collection parameter values ​​corresponding to the first control level.

5. In any one of claims 1 to 4, when the instructions are executed individually or collectively by the at least one processor, the electronic device: Based on identifying that there is no memory usage history exceeding the specified first ratio in the information regarding the memory usage, and that the average value is less than the specified second ratio relative to the total memory capacity, the second control level is identified, and An electronic device that controls the garbage collector parameters to be applied to the garbage collector to be performed with garbage collector parameter values ​​corresponding to the second control level.

6. In any one of claims 1 to 5, when the instructions are executed individually or collectively by the at least one processor, the electronic device: Based on identifying that there is no memory usage history exceeding the specified first ratio in the information regarding the memory usage, and that the average value is less than the specified third ratio relative to the total memory capacity, the third control level is identified, and The garbage collector parameters to be applied to the garbage collector to be performed are adjusted using garbage collector parameter values ​​corresponding to the third control level, and The third ratio is designated as equal to the second ratio or as greater than the second ratio and smaller than the first ratio, and the garbage collection parameter values ​​corresponding to the first control level are set such that the frequency of garbage collection to be performed is increased compared to the garbage collection parameter values ​​corresponding to the second control level or the third control level. The garbage collection parameter values ​​corresponding to the second control level are set such that the frequency of garbage collection to be performed is reduced compared to the garbage collection parameter values ​​corresponding to the first control level, and An electronic device in which the garbage collection parameter values ​​corresponding to the third control level are set such that the frequency of garbage collection to be performed is reduced compared to the garbage collection parameter values ​​corresponding to the first control level.

7. In any one of claims 1 to 6, when the instructions are executed individually or collectively by the at least one processor, the electronic device: Based on the total memory capacity of the electronic device being identified as a first capacity value, the second control level is determined, and An electronic device that determines the third control level based on the total memory capacity of the electronic device being identified as a second capacity value greater than the first capacity value.

8. In any one of claims 1 through 7, when the instructions are executed individually or collectively by the at least one processor, the electronic device: Based on the occurrence of a specified event, it is checked whether the above conditions are satisfied, and the specified event is a cold reset indicating power on or off, a warm reset indicating a platform reboot, or an event for applying the zygote process without a reboot, and An electronic device that confirms that the condition is satisfied based on the fact that the cumulative number of memory usage values ​​included in the information regarding the memory usage exceeds a specified number.

9. A method of operation in an electronic device (101, 201), The operation of obtaining information regarding memory usage from the memory (130, 220) of the electronic device at a specified period; An operation to check whether a condition for performing garbage collection (GC) to delete at least one object among the objects stored in the memory is satisfied; An operation to identify a control level corresponding to information regarding memory usage based on the satisfaction of the above conditions; An operation to adjust garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the identified control level; and A method comprising the operation of performing garbage collection based on the above-mentioned controlled garbage collection parameters.

10. In claim 9, the operation of identifying a control level corresponding to information regarding the memory usage is, The method includes an operation to identify a first control level based on identifying that there exists a memory usage history of at least a first ratio specified in the information regarding the memory usage above, and The operation of adjusting the garbage collection parameters for the garbage collection to be performed above is, A method comprising the operation of adjusting the garbage collection parameters to be applied to the garbage collector to be performed with garbage collection parameter values ​​corresponding to the first control level.

11. In either claim 9 or 10, the operation of identifying a control level corresponding to information regarding memory usage is, An operation to identify a previously set control level for each specified time interval based on information regarding the memory usage above; and The method further includes the operation of determining the most identified control level among the above identified control levels as the control level for the garbage collector to be performed, and A method comprising at least one of the above garbage collector parameters, wherein the parameters include a first parameter representing the largest size allowed for the heap to grow, a second parameter representing the maximum allowed free bytes, a third parameter representing the minimum allowed free bytes, a fourth parameter representing the maximum value to which the heap can grow, a fifth parameter representing the starting size of the heap after process creation, or a sixth parameter representing the ideal heap utilization rate.

12. In any one of claims 9 to 11, the operation of identifying a control level corresponding to information regarding memory usage is, An operation to obtain an average value of the accumulated memory usage values ​​included in the information regarding memory usage accumulated in the memory, based on identifying that there is no memory usage history greater than the specified first ratio in the information regarding memory usage; and The method includes an operation to identify the first control level based on identifying that the above average value is greater than or equal to a specified second ratio relative to the total memory capacity, and The operation of adjusting the garbage collection parameters for the garbage collection to be performed above is, A method comprising the operation of adjusting the garbage collection parameters to be applied to the garbage collection to be performed using the garbage collection parameter values ​​corresponding to the first control level.

13. In any one of claims 9 to 12, the operation of identifying a control level corresponding to information regarding memory usage is, The method includes an operation to identify the second control level based on identifying that there is no memory usage history greater than the specified first ratio in the information regarding the memory usage, and that the average value is less than the specified second ratio relative to the total memory capacity. The operation of adjusting the garbage collection parameters for the garbage collection to be performed above is, A method comprising the operation of adjusting the garbage collector parameters to be applied to the garbage collector to be performed with garbage collector parameter values ​​corresponding to the second control level.

14. In any one of claims 9 to 13, the operation of identifying a control level corresponding to information regarding memory usage is, The method includes an operation to identify the third control level based on identifying that there is no memory usage history greater than the specified first ratio in the information regarding the memory usage, and that the average value is less than the specified third ratio relative to the total memory capacity. The operation of adjusting the garbage collection parameters for the garbage collection to be performed above is, It includes the operation of adjusting the garbage collector parameters to be applied to the garbage collector to be performed using garbage collector parameter values ​​corresponding to the third control level, and The third ratio is designated as the same ratio as the second ratio, or as a ratio greater than the second ratio and smaller than the first ratio, The garbage collection parameter values ​​corresponding to the first control level are set such that the frequency of garbage collection to be performed is increased compared to the garbage collection parameter values ​​corresponding to the second control level or the third control level, and The garbage collection parameter values ​​corresponding to the second control level are set such that the frequency of garbage collection to be performed is reduced compared to the garbage collection parameter values ​​corresponding to the first control level, and The garbage collection parameter values ​​corresponding to the third control level are set such that the frequency of garbage collection to be performed is reduced compared to the garbage collection parameter values ​​corresponding to the first control level, and The operation of checking whether the above conditions for performing the garbage collection (GC) are satisfied is performed based on the occurrence of a specified event, and A method in which the above-mentioned specified event is a cold reset indicating power on or off, a warm reset indicating platform reboot, or an event for applying a zygote process without reboot.

15. In a non-transient storage medium storing one or more programs, the program, when executed by at least one processor (120, 210) of an electronic device (101, 201), causes the electronic device: The operation of obtaining information regarding memory usage from the memory (130, 220) of the electronic device at a specified period; An operation to check whether a condition for performing garbage collection (GC) to delete at least one object among the objects stored in the memory is satisfied; An operation to identify a control level corresponding to information regarding memory usage based on the satisfaction of the above conditions; An operation to adjust garbage collection parameters for garbage collection to be performed with specified garbage collector parameter values ​​corresponding to the identified control level; and A non-transient storage medium comprising instructions for executing an operation to perform garbage collection based on the above-mentioned controlled garbage collection parameters.