Search

CN-121996164-A - Memory management method and memory device

CN121996164ACN 121996164 ACN121996164 ACN 121996164ACN-121996164-A

Abstract

The invention provides a memory management method and a memory device. The method comprises the steps of obtaining a plurality of mapping table continuity indexes, wherein the plurality of mapping table continuity indexes respectively correspond to a plurality of candidate entity units in a memory module and respectively reflect address continuity of mapping tables corresponding to the plurality of candidate entity units, and determining a first entity unit from the plurality of candidate entity units according to the plurality of mapping table continuity indexes so as to execute data arrangement operation. Therefore, the operation efficiency of the memory device can be improved.

Inventors

  • PENG CHONG

Assignees

  • 合肥开梦科技有限责任公司

Dates

Publication Date
20260508
Application Date
20260123

Claims (10)

  1. 1. A memory management method for a storage device, wherein the storage device comprises a memory module, and the memory management method comprises: Obtaining a plurality of mapping table continuity indexes, wherein the plurality of mapping table continuity indexes respectively correspond to a plurality of candidate entity units in the memory module and respectively reflect the address continuity of the mapping table corresponding to the plurality of candidate entity units, and And determining a first entity unit from the plurality of candidate entity units according to the plurality of mapping table continuity indexes so as to execute data sorting operation.
  2. 2. The memory management method of claim 1, wherein the plurality of mapping table continuity indicators includes a first mapping table continuity indicator, the first mapping table continuity indicator corresponding to a first candidate entity unit of the plurality of candidate entity units, and the mapping table continuity indicator reflecting continuity of a storage location in the memory module of a target mapping table corresponding to valid data stored in the first candidate entity unit.
  3. 3. The memory management method of claim 2, wherein the holding location comprises a plurality of target entity addresses, and the step of retrieving the plurality of mapping table continuity indicators comprises: And determining the continuity index of the first mapping table according to the distribution of the target entity addresses in the entity address space.
  4. 4. The memory management method of claim 3, wherein determining the first mapping table continuity indicator based on the distribution of the plurality of target entity addresses in the entity address space comprises: Determining a total number of address combinations in the plurality of target entity addresses based on the distribution, and And determining the continuity index of the first mapping table according to the total number.
  5. 5. The memory management method of claim 4, wherein determining the total number of the address combinations in the plurality of target entity addresses according to the distribution comprises: and grouping a plurality of consecutive entity addresses in the plurality of target entity addresses into the same address combination according to the distribution.
  6. 6. The memory management method of claim 3, wherein determining the first mapping table continuity indicator based on the distribution of the plurality of target entity addresses in the entity address space comprises: determining the duty ratio of successive entity addresses in the plurality of target entity addresses according to the distribution, and And determining the continuity index of the first mapping table according to the duty ratio.
  7. 7. The memory management method of claim 1, wherein determining the first entity unit from the plurality of candidate entity units according to the plurality of mapping table continuity indicators comprises: sorting the plurality of candidate entity units according to the plurality of mapping table continuity indexes to obtain a sorting result, and And determining the first entity unit from the plurality of candidate entity units according to the sorting result, wherein the first entity unit is the entity unit with highest or relatively higher continuity of the storage position of the mapping table corresponding to the stored effective data in the memory module.
  8. 8. The memory management method of claim 1, further comprising: acquiring effective count information corresponding to a plurality of entity units in the memory module, wherein the effective count information reflects a data amount of effective data stored by each entity unit in the plurality of entity units, and And determining the candidate entity units from the entity units according to the effective counting information.
  9. 9. The memory management method of claim 1, further comprising: In the data sort operation, data migration is performed on the valid data stored in the first entity unit.
  10. 10. A memory device, comprising: A connection interface for connecting to a host system; Memory module, and A memory controller connected to the connection interface and the memory module, Wherein the memory controller is to perform the memory management method of any of claims 1 to 9.

Description

Memory management method and memory device Technical Field The present invention relates to the field of storage technologies, and in particular, to a memory management method and a memory device. Background Generally, in garbage collection operation inside a storage device, a memory controller selects an entity block storing least valid data in a memory module as a source block, and migrates valid data collected from the source block to a target block for centralized storage. After the valid data has been completely migrated from the source block, the source block may be erased for storing new data. In practice, it has been found that even though a physical block of the memory module storing the least significant data is selected as a source block and a garbage collection operation is performed thereon, the performance of the garbage collection operation may not be improved due to a number of factors. Disclosure of Invention The invention provides a memory management method and a memory device, which can improve the efficiency of the memory device for executing data arrangement operation, thereby improving the performance of the whole memory device. The embodiment of the invention provides a memory management method which is used for a memory device, wherein the memory device comprises a memory module. The memory management method comprises the steps of obtaining a plurality of mapping table continuity indexes, wherein the plurality of mapping table continuity indexes respectively correspond to a plurality of candidate entity units in a memory module and respectively reflect address continuity of mapping tables corresponding to the plurality of candidate entity units, and determining a first entity unit from the plurality of candidate entity units according to the plurality of mapping table continuity indexes so as to execute data arrangement operation. The embodiment of the invention also provides a storage device which comprises a connection interface, a memory module and a memory controller. The memory controller is connected to the connection interface and the memory module. The memory controller is used for executing a memory management method. Based on the above, the first entity unit may be determined from the plurality of candidate entity units and used to perform the data sort operation by the map continuity index corresponding to the different candidate entity units. Therefore, the efficiency of the storage device for executing the data arrangement operation can be effectively improved, and the performance of the whole storage device is further improved. Drawings FIG. 1 is a schematic diagram of a data storage system shown in accordance with an embodiment of the present invention; FIG. 2 is a schematic diagram of a memory controller shown according to an embodiment of the present invention; FIG. 3 is a schematic diagram of a managed memory module shown in accordance with an embodiment of the present invention; FIG. 4 is a diagram illustrating a distribution of physical addresses storing a target mapping table according to an embodiment of the present invention; FIG. 5 is a diagram illustrating a distribution of physical addresses with a target mapping table according to an embodiment of the present invention; FIG. 6 is a flow chart of a memory management method according to an embodiment of the invention. Detailed Description Reference will now be made in detail to the exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings and the description to refer to the same or like parts. FIG. 1 is a schematic diagram of a data storage system shown in accordance with an embodiment of the present invention. Referring to fig. 1, a data storage system 10 includes a host system 11 and a storage device 12. The storage device 12 may be connected to the host system 11 and may be used to store data from the host system 11. For example, the host system 11 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, an industrial computer, a game machine, a server, or a computer system provided in a specific carrier (e.g., a vehicle, an aircraft, or a ship), or the like, and the type of the host system 11 is not limited thereto. Further, the storage device 12 may include a solid state disk, a USB flash drive, a memory card, or other type of non-volatile storage device. Host system 11 may include a processor 111 and a buffer memory 112. The processor 111 is responsible for the overall or partial operation of the host system 11. For example, the Processor 111 may include a central processing unit (Central Processing Unit, CPU), or other programmable general purpose or special purpose microprocessor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), programmable controller, application SPECIFIC INTEGRATED Circuits (ASIC), programmable logic device (Progr