201107969 * 六、發明說明: • 【發明所屬之技術領域】 本發明係關於-種移動智慧型終端及其記憶體動 態管理方法。 【先前技術】 在電腦系統或欲入式系統中,記憶體的使用頻率很 高。而隨著電子技術不斷發展,手機、PDA、數位相機 鲁等移動智慧型終端已經在生活中被廣泛使用’因此如何 使得移動智慧型終端的記憶體得到高效的使用顯 分的重要。 目前,移動智慧型終端常用的記憶體管理方法為分 區塊記憶體管理方法,這種記憶體管理方法需要預先配 置可供分配的記憶體區塊的個數和記憶體區塊的大 所配置的§己丨思體區塊個數以及記憶體區塊大小是固 疋的,延樣可能導致有些大小的記憶體區塊不夠使用而 •有些大小的記憶體區塊卻又沒有被利用,因此使得記憶 體不能夠得到高效的使用。 【發明内容】 复鑒於以上内容,有必要提供一種移動智慧型終端及 a其記憶體動態管理方法’其可在移動智慧型終端開機的 時候根據該移動智慧型終端在上一次關機時所存儲的 用戶對記憶體的實際使用狀況對記憶體的配置進 態調整。 所述移動智慧型終端,包括記憶體和動態記憶體管 201107969 理單元’所述記憶體包括:動態記憶體配置列表,用於 存儲用戶對該移動智慧型終端記憶體的實際使用狀 況;所述域體管理單元包括:讀取频,用於讀取記 L體中存儲的用戶對該移動智慧型終端記憶體的實際 使用狀況;配置模組’用於根據上述所讀取的用戶對記 憶體的實際使用狀況調整該移動智慧型終端的記憶體 配置’、、4构、、a ’用於當對該移動智慧型終端的記憶體 >配置,行調整後即時統計用戶對記憶體的實際使用狀 況’子儲核組’用於當該移動智慧㈣端關機時將上述 所統計的用戶對記憶體的實際使用狀況存儲在記憶體 的動態記憶體配置列表中。 所述移動智慧型終端記憶體動態管理方法,該㈣ 智慧型終端包括動態記憶體管理單元和記憶體,該方法 包括如下步驟:⑷當該移動智慧型終端開機時,判斷該 移動智慧祕端是否為第—次開機使用,若為第-次開 機使用,動態記憶體管理單元讀取所述記憶體中存健的 默1己憶體配置狀況並對記憶體進行初始化配置,铁後 轉入步驟(C)’否則讀取所述記憶體十存儲的用戶對記憶 體的狀況,轉入步驟⑻;(b)動態記憶體管理 早兀根據上述所讀取的用戶_記憶體的實際使 對該移動智慧型終端的記憶體配置進行動態調整,·⑷ 動^己憶體管理單元即時統計用戶對該移動智終 端的記憶體的實際使用狀況;⑷當該移動智普型Μ 機時’動態記憶體管理單元將上述所統計_戶對㈣ 201107969 體的實際使用狀況存儲在記憶體中。 相較於習知技術,所述 體動態管理方法,可根據用戶對端及其記憶 憶體在充分滿足用戶需求:门置,仃動態調整,使得記 用效率。 戶4的同時也提高了記憶體的使 【實施方式】 所示’係本發明移動智慧型終端較 該移動智慧型終端1可以為手機、數位_ 留…曰霧°又備,其包含-動態記憶體管理 早兀和一記憶體3。所述動態記憶體管理單元2用於 根據用戶對移動智攀型炊迪 ' 況對該記㈣的配置進行«調整。所述記憶體 一默認記憶體配置列表31 H態記憶體配置列表 32。所述默認記憶體配置列表31用於存儲所述移動知 慧型終端1的默認記憶體配置狀況,其用於對該移動智 慧型終端1在第-次開機使用時進行初始化記憶體酉日己 置’·所述動態記憶體配置列表32用於存儲用戶對所述 移動智慧型終端i的記憶體的實際使用狀況,其用於對 所述移動智慧型終端i的記憶體配置進行動態調整。所 述記憶體的實際使用狀況是指用戶對該記憶體的不同 記憶體分區中記憶體區塊的使用峰值以及使用頻率,如 圖2中所示的用戶對大小為3〇Bytes的記憶體區塊所屬 記憶體分區的使用頻率為65〇次,使用峰值為4〇〇個記 201107969 憶體區塊,該使用峰值和使用頻率是指所述移動智慧型 終化1在本次開機前所統計的各記憶體分區中記憶體 區塊的最大使用個數以及使用次數。 所述動態記憶體管理單元2包括一讀取模組21、 一配置模組22、一統計模組23以及一存儲模組24。所 述躓取模組21用於讀取所述記憶體3中存儲的記憶體 配置列表,具體而言,當所述移動智慧型終端土為第一 -人開機使用時,則讀取所述默認記憶體配置列表Η中 存儲的默認記憶體配置狀況,否則讀取所述動態記憶體 配置列表32中存儲的用戶對該移動智慧型終端i的記 憶體的實較収況。料配置模組22祕根據所述 %取模組21讀取的默認記憶體配置狀況耽憶體進行 配置,或根制戶對該記憶體的使用峰值及使用 ^ ^體的配置進行動態調整;所述統計模組23 各分區的實際使用妝卬如+ 士 己隐體中 移動知存職組24用於當所述 用^慧型終端1關機時將上述統計模組23所統叶的 用戶對記憶體的實際使用壯 既才的 配置列表32中,具體而儲在所述動態記憶體 態記憶體配置列表32清空而要先將絲 統計的用戶對,_从…再將該統計模組2 3所 動態記憶體配置列表32中。使用頻率存儲在該 如圖2所示,係本發明恭 同記憶體分區中t γ ^ F &只也彳中根據用戶對不 匚中4體區塊的使用峰值和使用頻率來 201107969 動態調整記憶體配置的示意目。如圖所$,所述記憶體 ' 區塊大小分別為 3〇Bytes、5〇Bytes、8〇Bytes、l〇〇Bytes、 150Bytes > 20〇Bytes所屬的記憶體分區中記憶體區塊個 數的原始配置分別為5〇〇、1000、700、500、300、200, 該記憶體的總容量為256〇〇〇Bytes。其中,所述的使用 頻率與使用峰值均為所述移動智慧型終端i於本次開 機前所統計的用戶對不同記憶體分區中記憶體區塊的 φ使用峰值和使用頻率,並於關機時將該統計的資料保存 在所述记憶體3的動態記憶體配置列表32中;在本較 佳實施例中,所述移動終端i在每次開機時根據用戶對 記憶體的實際使用狀況對記憶體的配置進行調整,所述 的原始配置是指該移動智慧型、終4 1纟本次開機之前 的記憶體配置狀況,或者是該移動智慧型終端工在第一 次開機使用時的默認記憶體配置狀況。本較佳實施例中 根據用戶對不同記憶體分區中記憶體區塊的使用峰值 Φ 動態調整記憶體區塊的配置通過以下公式來實現: 依使用峰值^周整後5己憶體區塊個數=記憶體區塊使 用峰值/k ; 其中0<k<l,可以根據需要設置k的取值,為方便 說明,在本實施例中,取k的值為〇8。如圖2所示, 3〇Bytes記憶體分區中的記憶體區塊原始配置為 個,使用峰值為400個,當該移動智慧型終端i再次開 機時通過以上所述公式對該3 G B y t e s記憶體分區中的記 憶體區塊的個數重新調整為4〇〇/〇 8=5〇〇,該個數與原 201107969 •始配置相同’其中所述細⑽記憶體分區是指該記憶 、體分區中所有的記憶體區塊大小為30Bytes ; 50Bytes 己隐體为區的記憶體區塊原始配置為1〇〇〇個,使用峰 值為580個,通過以上公式對該5〇Bytes記憶體分區中 的圯憶體區塊的個數重新調整為58〇/〇 8 = 725 ;同理, 根據上述方法將8〇Bytes記憶體分區、100Bytes記憶體 分區、150Bytes記憶體分區以及2〇〇Bytes記憶體分區 籲的記憶體區塊由原始配置的記憶體區塊個數700、500、 300、200 分別調整為 875、4〇〇、25〇、25〇。 圖2中,依使用頻率配置剩餘記憶體是指將通過使 用峰值調整記憶體區塊的配置以後,將所剩餘的記憶體 谷罝按比例分配到使用頻率較高的η個記憶體區塊 中,η可以按實際記憶體分區的個數而具體設定,為方 便說明,在本實施例中將所述的剩餘記憶體容量分配到 使用頻率排在前三的記憶體區塊中。從圖2中可以看 # 出,通過依使用峰值調整記憶體區塊配置以後,所有分 區的總容量之和為248750Bytes,還剩餘的記憶體容量 為 256000Bytes-248750Bytes =7250Bytes,然後從圖 2 中可以看出使用頻率排在前三的記憶體分區分別是 5〇Bytes記憶體分區、200Bytes記憶體分區和8〇Bytes 記憶體分區中的記憶體區塊’其使用頻率的比例為2: 2 : 1 ’因此需要將剩餘的7250Bytes的記憶體容量按2 : 2 : 1的比例分配到上述5〇Bytes記憶體分區、2〇〇Bytes 記憶體分區和80Bytes記憶體分區中,具體而言, 201107969 5〇Bytes 的 記憶 體區塊可分得 7250Bytesx0.4=2900Bytes ’ 其可組成大小為 5〇Bytes 的 s己憶體區塊個數為2900Bytes/50Bytes=58,因此將剩餘 的圮憶體容量分配以後50Bytes分區中的記憶體區塊個 數為725+58 = 783 ;按同樣的方法將剩餘的容量分配到 200Bytes記憶體分區和80Bytes記憶體分區以後, 8〇Bytes記憶體分區中記憶體區塊的個數為 籲875 + 18=893 ’ 200Bytes記憶體分區中記憶體區塊的個數 為250 + 14=264’而其他記憶體分區中記憶體區塊的個 數仍保持為依使用峰值調整後的個數。 —如圖3所示,係本發明移動智慧型終端記憶體動態 管理方法的流程圖。 步驟S00,將移動智慧型終端丄開機 是否為第一次 步驟SOI,判斷該移動智慧型終端玉 開機使用。 :在步驟斯中判斷該移動智慧型終端工為第一: 開機使用,則轉人步驟咖,否則轉人步驟咖。 步驟S010,讀取模組21讀取記 憶體配置列表31。 " 中的默認’ 芡驟5>011,配置模201107969 * VI. Description of the invention: • Technical field to which the invention pertains The present invention relates to a mobile intelligent terminal and a memory dynamic management method thereof. [Prior Art] In a computer system or a system to be used, the frequency of use of the memory is high. With the continuous development of electronic technology, mobile smart terminals such as mobile phones, PDAs, and digital cameras have been widely used in their lives. Therefore, it is important to make the memory of mobile smart terminals more efficient. At present, the memory management method commonly used in mobile smart terminals is a partition block memory management method, and the memory management method needs to pre-configure the number of memory blocks available for allocation and the large configuration of the memory blocks. § The number of blocks in the body and the size of the memory block are fixed. The sample may cause some memory blocks to be insufficiently used. • Some memory blocks are not used, so Memory cannot be used efficiently. SUMMARY OF THE INVENTION In view of the above, it is necessary to provide a mobile smart terminal and a memory dynamic management method thereof, which can be stored when the mobile smart terminal is powered on according to the mobile smart terminal when it was last turned off. The user's actual use of the memory adjusts the configuration of the memory. The mobile smart terminal includes a memory and a dynamic memory tube 201107969. The memory includes: a dynamic memory configuration list for storing a user's actual usage status of the mobile smart terminal memory; The domain management unit includes: a read frequency for reading the actual usage status of the mobile smart terminal memory stored by the user stored in the L body; and the configuration module 'for the user-to-memory read according to the above The actual usage status adjusts the memory configuration of the mobile smart terminal ', 4, and a' for the memory of the mobile smart terminal> configuration, and the user is actually counted to the actual memory after the line adjustment. The usage status 'sub-memory bank group' is used to store the above-mentioned statistics of the actual usage status of the user on the memory in the dynamic memory configuration list of the memory when the mobile smart (4) is powered off. The mobile smart terminal memory dynamic management method, the (four) smart terminal comprises a dynamic memory management unit and a memory, the method comprising the following steps: (4) determining whether the mobile smart terminal is when the mobile smart terminal is powered on For the first time use, if it is used for the first time, the dynamic memory management unit reads the configuration of the memory in the memory and initializes the memory, and then transfers the steps to the iron. (C) 'Otherwise reading the state of the user stored in the memory ten to the memory, and proceeding to step (8); (b) managing the dynamic memory early according to the actual user_memory read as described above The memory configuration of the mobile smart terminal is dynamically adjusted, and (4) the mobile memory management unit instantly counts the actual usage of the memory of the mobile smart terminal by the user; (4) the dynamic memory when the mobile smart type is down. The volume management unit stores the actual usage status of the above-mentioned statistical_household (four) 201107969 body in the memory. Compared with the prior art, the body dynamic management method can fully meet the user's needs according to the user's opposite end and its memory memory: the door setting and the dynamic adjustment make the utilization efficiency. At the same time, the user 4 also improves the memory. [Embodiment] The mobile smart terminal of the present invention can be used for mobile phones, digital devices, and mobile phones. Memory management is early and a memory is 3. The dynamic memory management unit 2 is configured to adjust the configuration of the record (four) according to the user's mobile smart type. The memory is a default memory configuration list 31 H state memory configuration list 32. The default memory configuration list 31 is configured to store a default memory configuration status of the mobile smart terminal 1 for initializing the memory of the mobile smart terminal 1 during the first power-on use. The dynamic memory configuration list 32 is configured to store the actual usage status of the memory of the mobile smart terminal i by the user, and is used to dynamically adjust the memory configuration of the mobile smart terminal i. The actual use status of the memory refers to the peak usage of the memory block in the different memory partitions of the user and the frequency of use, as shown in FIG. 2, the memory area of the user pair size is 3 Bytes. The memory partition used by the block is used 65 times, and the peak value is 4〇〇 201107969 memory block. The peak value and frequency of use refer to the mobile smart finalization 1 before the boot. The maximum number of memory blocks used and the number of uses in each memory partition. The dynamic memory management unit 2 includes a reading module 21, a configuration module 22, a statistical module 23, and a storage module 24. The capture module 21 is configured to read a memory configuration list stored in the memory 3, and specifically, when the mobile smart terminal is used for the first-person boot, the read The default memory configuration status stored in the default memory configuration list ,, otherwise the real state of the memory of the mobile smart terminal i stored in the dynamic memory configuration list 32 is read. The material configuration module 22 is configured according to the default memory configuration status read by the % module 21, or the root user dynamically adjusts the peak usage of the memory and the configuration of the body; The actual use of the partitions of the statistical module 23, such as the mobile storage group 24 in the singularity of the singularity, is used for the user of the statistic module 23 when the sci-fi terminal 1 is powered off. In the configuration list 32 of the actual use of the memory, specifically, the user is stored in the dynamic memory state memory configuration list 32, and the user is counted first, and then the statistical module 2 3 dynamic memory configuration lists 32. The frequency of use is stored in the figure as shown in FIG. 2, which is in the memory partition of the present invention, t γ ^ F & only in accordance with the user's use of the peak of the body block and the frequency of use of the 201107969 dynamically adjusted 201107969 The schematic of the memory configuration. As shown in the figure, the memory block size is 3〇Bytes, 5〇Bytes, 8〇Bytes, l〇〇Bytes, 150Bytes > the number of memory blocks in the memory partition to which 20〇Bytes belongs. The original configuration is 5〇〇, 1000, 700, 500, 300, 200, and the total capacity of the memory is 256〇〇〇Bytes. Wherein, the usage frequency and the usage peak are both the peak value and the use frequency of the memory block of the memory block of the user in the different memory partitions that are counted by the mobile smart terminal i before the current boot, and are turned off. The data of the statistic is saved in the dynamic memory configuration list 32 of the memory 3; in the preferred embodiment, the mobile terminal i is activated according to the actual usage status of the memory by the user each time the computer is turned on. The configuration of the memory is adjusted. The original configuration refers to the mobile smart configuration, the memory configuration status before the current boot, or the default of the mobile smart terminal when the first boot is used. Memory configuration status. In the preferred embodiment, according to the user's use of the memory block in different memory partitions, the configuration of the memory block is dynamically adjusted by the following formula: According to the use of the peak ^ week after the 5 recalled block Number = memory block uses the peak value /k; where 0 <k<l, the value of k can be set as needed. For convenience of description, in the present embodiment, the value of k is 〇8. As shown in FIG. 2, the memory blocks in the 3〇Bytes memory partition are originally configured as one, and the peak value is 400. When the mobile smart terminal i is powered on again, the 3 GB ytes memory is learned by the above formula. The number of memory blocks in the volume partition is re-adjusted to 4〇〇/〇8=5〇〇, which is the same as the original 201107969 • the first configuration. The fine (10) memory partition refers to the memory and body. The size of all the memory blocks in the partition is 30 Bytes; the original memory block of the 50 Bytes area is 1 ,, and the peak value is 580. The above 5 Bytes memory partition is used in the above formula. The number of memory blocks is re-adjusted to 58〇/〇8 = 725. Similarly, 8〇Bytes memory partition, 100Bytes memory partition, 150Bytes memory partition, and 2〇〇Bytes memory according to the above method. The memory block of the partition is adjusted to 875, 4, 25, and 25 by the number of memory blocks 700, 500, 300, and 200 originally configured. In FIG. 2, configuring the remaining memory according to the frequency of use means that after the configuration of the memory block is adjusted by using the peak, the remaining memory valleys are proportionally distributed to the n memory blocks having a higher frequency of use. η can be specifically set according to the number of actual memory partitions. For convenience of description, in the present embodiment, the remaining memory capacity is allocated to the first three memory blocks. From Figure 2, you can see #出, after adjusting the memory block configuration according to the peak value, the sum of the total capacity of all partitions is 248750 Bytes, and the remaining memory capacity is 256000 Bytes-248750 Bytes = 7250 Bytes, and then from Figure 2 It can be seen that the memory partitions ranked in the top three are 5 Bytes memory partition, 200 Bytes memory partition and 8 Bytes memory partition. The ratio of the frequency of use is 2: 2 : 1 'Therefore, the remaining 7250 Bytes of memory capacity needs to be allocated to the above 5 Bytes memory partition, 2 Bytes memory partition and 80 Bytes memory partition in a ratio of 2:2:1, specifically, 201107969 5〇 The memory block of Bytes can be divided into 7250 Bytes x 0.4 = 2900 Bytes ' The number of s hexadecimal blocks that can be composed of 5 〇 Bytes is 2900 Bytes / 50 Bytes = 58, so the remaining memory capacity is allocated 50 Bytes later. The number of memory blocks in the partition is 725+58 = 783; after the same method is used to allocate the remaining capacity to the 200Bytes memory partition and the 80Bytes memory partition, 8〇Bytes memory The number of memory blocks in the partition is 875 + 18=893 '200Bytes. The number of memory blocks in the memory partition is 250 + 14=264' and the number of memory blocks in other memory partitions is still Keep the number adjusted according to the peak usage. - As shown in Fig. 3, it is a flow chart of the dynamic management method of the mobile smart terminal memory of the present invention. In step S00, whether the mobile smart terminal is powered on is the first step SOI, and it is determined that the mobile smart terminal jade is powered on. : In the step of determining the mobile smart terminal is the first: when the boot is used, then the step coffee is transferred, otherwise the step coffee is transferred. In step S010, the reading module 21 reads the memory configuration list 31. Default in " Step 5 > 011, Configure Mode
取的默認記憶體配置列表模組M 狀況初始化所述移騎慧型終端i的記 步驟S04。 L G體配置’轉 步驟S〇2,讀取模組21讀取記憶雜3中的動態 201107969 * 憶體配置列表32。 ' 步驟S〇3,配置模組22根據上述讀取模 的動態記憶體配置列表32中、、' 碩取 際使用狀、戈f+P命& 子@的用戶對記憶體的實 5Γ、使用狀况對矛夕動智慧型終端 貫 態調整。 L餸配置進行動 步驟S〇4’統計模組23即時統計用 型終端1的記憶體的實際使用狀況。 、夕曰慧 移動智慧型終端1是否關機。 步驟2 斷移動智慧型終端…機,則轉入 步驟S06,否則返回步驟S04。 入 步驟S06,存儲模組24將統計模 戶對移動智慧型終端i的 斤冼计的用 於节情# 的體的實際使用狀況存儲 於》己巴體3的動態記憶體配置列表%中。 省 以上所述僅為本發明之較佳實施例^ :之使用功效,凡其他未脫離本發明所揭示 3廣 凡成之均等變化或修飾,均應:所 圍内。 3仕卜述之申4專利範 【圖式簡單說明】 構圖圖1係為本發明移動智慧型終端較佳實施例的架 憶體=Λ為圭/施例令根據用戶對不同記 調整記憶體配:=用峰值和使用頰率來動態 圖3係為本發明移動智慧型終端記憶體動態管理 11 201107969 方法的流程圖。 【主要元件符號說明】The default memory configuration list module M state is initialized to record the step S04 of the mobile smart terminal i. L G body configuration 'Turn step S 〇 2, read module 21 reads the dynamics in memory 3 201107969 * Memory configuration list 32. In step S〇3, the configuration module 22 is based on the dynamic memory configuration list 32 of the read mode, and the user of the memory usage, the memory of the f+P life & The use condition is adjusted for the state of the smart terminal. The L餸 configuration is performed. The step S〇4' statistic module 23 instantaneously counts the actual use status of the memory of the terminal 1 for use.夕曰慧 Mobile smart terminal 1 is turned off. Step 2 If the mobile terminal is disconnected, the process proceeds to step S06, otherwise, the process returns to step S04. In step S06, the storage module 24 stores the actual usage status of the body for the hash # of the mobile smart terminal i in the dynamic memory configuration list % of the hexagram body 3. The above is only the preferred embodiment of the present invention, and the other functions and modifications of the present invention are not included in the scope of the invention. 3Shi Buzhi's Shen 4 Patent Model [Simplified Description of the Drawings] FIG. 1 is a frame of the mobile intelligent terminal of the present invention, which is a memory of the preferred embodiment of the present invention. Matching: = Dynamics with peak value and using cheek rate Figure 3 is a flow chart of the method for dynamic management of mobile intelligent terminal memory of the present invention 11 201107969. [Main component symbol description]
移動智慧型終端 1 動態記憶體管理單元 2 記憶體 3 讀取模組 21 配置模組 22 統计板組 23 存儲模組 24 默認記憶體配置列表 31 動態記憶體配置列表 32 移動智慧型終端開機 S00 是否為第一次開機? S01 讀取記憶體中的動態記憶體配置列表 S02 調整移動智慧型終端的記憶體配置 S03 即時統計記憶體的實際使用狀況 S04 是否關機? S05 將記憶體的實際使用狀況存儲於動態記憶體配置 列表中 S06 讀取記憶體中的默認記憶體配置列表 S010 初始化移動智慧型終端的記憶體配置 son 12Mobile Smart Terminal 1 Dynamic Memory Management Unit 2 Memory 3 Read Module 21 Configuration Module 22 Statistics Board Group 23 Memory Module 24 Default Memory Configuration List 31 Dynamic Memory Configuration List 32 Mobile Smart Terminal Boot S00 Is it the first time to boot? S01 Read the list of dynamic memory configurations in the memory S02 Adjust the memory configuration of the mobile smart terminal S03 Real-time statistics memory usage S04 Is it turned off? S05 Stores the actual usage status of the memory in the dynamic memory configuration list. S06 Reads the default memory configuration list in the memory. S010 Initializes the memory configuration of the mobile smart terminal.