Method for equalizing swap partition loss of memory
The invention discloses a method for equalizing the swap partition loss of a memory and belongs to the technical field of the storage of the mobile devices. The method comprises step 1, arranging a counter for recording the age of a page slot for each page slot on an NVRAMSwap partition and adding 1...
Saved in:
Main Authors | , , , , , |
---|---|
Format | Patent |
Language | English |
Published |
21.01.2015
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The invention discloses a method for equalizing the swap partition loss of a memory and belongs to the technical field of the storage of the mobile devices. The method comprises step 1, arranging a counter for recording the age of a page slot for each page slot on an NVRAMSwap partition and adding 1 to each counter upon every writing on the corresponding page slot, step 2, establishing a min heap for saving the page slot information in the NVRAMSwap partition and putting the youngest page slot to the top of the min heap according to the page slot ages on the counters, and also establishing a doubly linked list for saving all idle page slots, and step 3, comparing the age difference between the page slot at the header of the doubly linked list and the page slot at the top of the min heap and determining the page slot to be used. The method for equalizing the swap partition loss of the memory has the technical effects that the idle and less-written page slot is found out from the NVRAMSwap partition to carry a DRAM page and the writing loss equalization of the NVRAMSwap partition is realized. |
---|---|
Bibliography: | Application Number: CN20141527352 |