Method and apparatus for recording cold/hot state of memory
AssigneeCloud Intelligence Assets Holding (Singapore) Private Limited
InventorHao Zheng
Life of this patent
Estimating the term…
Abstract
A method and an apparatus for recording a cold/hot state of a memory, the method includes: determining a first cold/hot state set, wherein the first cold/hot state set is configured for recording a first cold/hot state type of a reserved memory of a host machine, where a plurality of cold/hot state sets are maintained in the host machine, and each cold/hot state set corresponds to one cold/hot state type; scanning sequentially an item in the first cold/hot state set, wherein the first cold/hot state set includes at least one item, and the at least one item forms an out-of-order array, and each item includes a memory slice serial number, memory size information, a next field and a process field.
Claims20
A method for recording a cold/hot state of a memory, comprising:
- determining a first cold/hot state set, wherein the first cold/hot state set is configured for recording a first cold/hot state type of a reserved memory of a host machine, wherein a plurality of cold/hot state sets are maintained in the host machine, and each cold/hot state set corresponds to one cold/hot state type;
- scanning sequentially an item in the first cold/hot state set, wherein the first cold/hot state set comprises at least one item, and the at least one item forms an out-of-order array, and each item comprises a memory slice serial number, memory size information, a next field and a process field;
- the scanning sequentially an item in the first cold/hot state set comprises:
- scanning a first memory area in a first item, and judging whether a state transition occurs in the first memory area, wherein the first item is any one item in the first cold/hot state set, and the first memory area comprises one or more continuous memory slices;
- in the case that the state transition occurs in the first memory area, deleting data recording the first memory area from the first item, and creating a second item in a second cold/hot state set, wherein the second item is configured for recording a cold/hot state of the first memory area, and the second cold/hot state set corresponds to a second cold/hot state type of the first memory area after the state transition occurs.
An apparatus for recording a cold/hot state of a memory, comprising:
- a processor and a memorizer in communication with the processor;
- the memorizer stores a computer-executed instruction;
- the processor executes the computer-executed instruction stored in the memorizer to implement the following steps:
- determining a first cold/hot state set, wherein the first cold/hot state set is configured for recording a first cold/hot state type of a reserved memory of a host machine, wherein a plurality of cold/hot state sets are maintained in the host machine, and each cold/hot state set corresponds to one cold/hot state type;
- scanning sequentially an item in the first cold/hot state set, wherein the first cold/hot state set comprises at least one item, and the at least one item forms an out-of-order array, and each item comprises a memory slice serial number, memory size information, a next field and a process field;
- wherein regarding the scanning sequentially an item in the first cold/hot state set, the processor is specifically configured to:
- scan a first memory area in a first item, and judge whether a state transition occurs in the first memory area, wherein the first item is any one item in the first cold/hot state set, and the first memory area comprises one or more continuous memory slices;
- in the case that the state transition occurs in the first memory area, delete data recording the first memory area from the first item, and create a second item in a second cold/hot state set, wherein the second item is configured for recording a cold/hot state of the first memory area, and the second cold/hot state set corresponds to a second cold/hot state type of the first memory area after the state transition occurs.
A non-transitory computer-readable storage medium for storing a computer program, wherein the computer program comprises codes for implement the following steps:
- determining a first cold/hot state set, wherein the first cold/hot state set is configured for recording a first cold/hot state type of a reserved memory of a host machine, wherein a plurality of cold/hot state sets are maintained in the host machine, and each cold/hot state set corresponds to one cold/hot state type;
- scanning sequentially an item in the first cold/hot state set, wherein the first cold/hot state set comprises at least one item, and the at least one item forms an out-of-order array, and each item comprises a memory slice serial number, memory size information, a next field and a process field;
- the scanning sequentially an item in the first cold/hot state set comprises:
- scanning a first memory area in a first item, and judging whether a state transition occurs in the first memory area, wherein the first item is any one item in the first cold/hot state set, and the first memory area comprises one or more continuous memory slices;
- in the case that the state transition occurs in the first memory area, deleting data recording the first memory area from the first item, and creating a second item in a second cold/hot state set, wherein the second item is configured for recording a cold/hot state of the first memory area, and the second cold/hot state set corresponds to a second cold/hot state type of the first memory area after the state transition occurs.
Dependencies are inferred from the claim text.