Picture memory managing method and apparatus
A technology of memory management and pictures, applied in the direction of image memory management, etc., can solve problems such as insufficient memory space of pictures, achieve the effect of improving user experience, browsing pictures clearly and smoothly, and optimizing the use of picture memory
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2015-11-11
- Estimated Expiration
- Not applicable · inactive patent
Smart Images
Figure 1
Abstract
Description
technical field
[0001] The invention relates to the technical field of mobile device memory management, in particular to a picture memory management method and device for an Android operating system. Background technique
[0002] The Android operating system (hereinafter referred to as the system) has been used in various devices including mobile phones, tablets, and set-top boxes. Mobile phones, tablets, and set-top boxes have become indispensable devices for people's leisure and entertainment.
[0003] These devices use text or a combination of text and pictures when interacting with users. The more the display interface is switched, the more pictures need to be used.
[0004] The available memory space of the system for the application is limited, and loading a 1M picture into the memory will occupy about 10M of memory, and the memory allocated by the system for each dalvik virtual machine is limited, such as in Google's G1 , the heap memory allocated to the application ...
Examples
Embodiment Construction
[0032] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0033] refer to figure 1 .
[0034] The picture memory management method suitable for the Android operating system provided by this embodiment includes the following steps.
[0035] a. Create Lrucache hard reference cache module 1, and set the cache maximum value of Lrucache hard reference cache module 1.
[0036] Lrucache hard reference cache module 1 is a cache module based on the Lru algorithm. The principle of the Lru algorithm is to remove the least recently used data.
[0037] Set the maximum cache value of the Lrucache hard reference cache module 1, which is generally 1 / 8 of the memory available to the application. The size of the Lrucache hard reference cache module 1 can be set according to the needs of the device or application.
[0038] Lrucache hard reference cache module 1 saves data with key and value values. When it is necessa...