Patent ID: 7457919

Claim:
A method for memory page management, suitable for managing data in a plurality of memory blocks of a memory, comprising: a. recording a plurality of pages in a first register, wherein the pages are recorded in the first register according to the accessing sequence of the data in the memory blocks; b. when a request for reading data is received, determining whether the data is stored in the memory blocks; b1. if the data is stored in the memory blocks, finding out the corresponding page and changing the corresponding page stored with data in the first register to the foremost page of the first register, wherein the step of changing the corresponding page stored with data in the first register to the foremost page of the first register further comprises: b11. recording a plurality of pages in a second register, wherein the corresponding page stored with data in the second register is recorded as a preset value, and other pages are recorded as zero; b12. performing a logic AND calculation for the pages in the first register and the pages in the second register, and recording the result in the second register; b13. moving other pages sorted in front of the page in the first register backwards by one bit group; and b14. changing the corresponding page stored with data in the second register to the foremost page; b15. performing a logic OR calculation for the pages in the first register and the pages in the second register; and b16. recording the calculation result in the first register; b2. if the data is not stored in the memory blocks, taking the last page of the first register as the page for storing the data, and storing the data accessed from an external storage device to the memory block corresponding to the page; and c. outputting the data read from the memory block corresponding to the page.