Dynamic memory management operation

Methods, systems, and devices for dynamic memory management operation are described. A memory system may store data in a first block that includes a first type of memory cells configured to store a single bit of information (e.g., single level cells (SLCs)). The memory system may set a flag associated with the data indicating whether the data includes secure information and is to remain in a block that includes SLCs after a memory management operation (e.g., a garbage collection operation). The memory system may store, as part of the memory management operation for the first block and based on the flag, valid data of the first block in a second block that includes SLCs or a third block that includes a second type of memory cells configured to store two or more bits of information.

CROSS REFERENCE

The present application for patent is a 371 national phase filing of International Patent Application No. PCT/CN2021/081538 by Wang et al., entitled “DYNAMIC MEMORY MANAGEMENT OPERATION,” filed Mar. 18, 2021, assigned to the assignee hereof, and expressly incorporated by reference herein.

FIELD OF TECHNOLOGY

The following relates generally to one or more systems for memory and more specifically to dynamic memory management operation.

BACKGROUND

Memory devices are widely used to store information in various electronic devices such as computers, user devices, wireless communication devices, cameras, digital displays, and the like. Information is stored by programing memory cells within a memory device to various states. For example, binary memory cells may be programmed to one of two supported states, often corresponding to a logic 1 or a logic 0. In some examples, a single memory cell may support more than two possible states, any one of which may be stored by the memory cell. To access information stored by a memory device, a component may read, or sense, the state of one or more memory cells within the memory device. To store information, a component may write, or program, one or more memory cells within the memory device to corresponding states.

DETAILED DESCRIPTION

A memory system may perform one or more memory management (e.g., maintenance) operations to improve a performance of the memory system. For example, the memory system may determine to perform a garbage collection operation on a block of memory cells. In connection with a garbage collection operation for a block of memory cells, the memory system may evaluate a logical-to-physical (L2P) table to identify which of the sets of data stored by the block of memory cells are valid. The memory system may then store the valid data in a different block of memory cells and erase the data (e.g., the valid data and the invalid data) stored in the block of memory cells, which may make the block of memory cells available to store new data, for example. In some cases, a memory management operation (e.g., a garbage collection operation) to change the storage density of the data. For examples, sometimes data stored in SLC blocks may be moved to MLC blocks, TLC blocks, or QLC blocks to increase the storage density of the data. Storing data in MLC blocks, TLC blocks, or QLC blocks may reduce the reliability of the data stored, may take additional power, and the access operations may take longer.

Additionally or alternatively, the memory system include one or more blocks of memory cells configured to store data securely (e.g., more securely than other portions of the memory system configured to store data). For example, the memory system may include a Replay Protected Memory Block (RPMB) configured to store data securely. In order to access data stored in the RPMB, the memory system may first perform an authentication procedure (e.g., provide a key to access the RPMB). For example, in order to write data to the RPMB, the memory system may perform the authentication procedure (e.g., using an RPMB key) prior to performing an authenticated write operation on the RPMB. Additionally, the memory system may generate a copy of the RPMB data to store in another block to increase the reliability of the RPMB data.

An RPMB block may include an single-level cell (SLC) block (e.g., may include SLCs), which may be associated with a higher reliability when compared to blocks configured to store two or more bits of information (e.g., blocks including multi-level cells (MLCs), blocks including tri-level cells (TLCs), or blocks including quad-level cells (QLCs)). The blocks including types of cells configured to store one or bit of information may be referred to as, for example, SLC blocks, MLC blocks, TLC blocks, or QLC blocks. When performing a memory management operation such as a garbage collection operation at an RPMB, the memory system may store the valid data in another SLC block of memory cells (e.g., instead of an MLC, TLC, or QLC block) to ensure that the RPMB data is stored with more reliability than other types of blocks after an execution of the memory management operation. In some cases, the memory system may include one or more dedicated RPMB blocks. That is, the memory system may include blocks of memory cells that are configured to store RPMB data. When executing a garbage collection operation at a memory system including dedicated RPMB blocks, the memory system may store valid data from a first RPMB block in a second RPMB block.

In some other cases, the memory system may include one or more dynamic RPMB blocks. That is, the memory system may include SLC blocks that may or may not store RPMB data. In a case that the memory system includes dynamic RPMB blocks, prior to executing a garbage collection operation at an SLC block, the memory system may determine whether the SLC block includes RPMB data (e.g., as opposed to data not associated with an RPMB block) to ensure that the valid RPMB data is stored in another SLC block (e.g., as opposed to an MLC, TLC, or QLC block) after the execution of the garbage collection operation. For example, the memory system may set a flag associated with each SLC block to indicate whether the data is to be stored at an SLC block during a garbage collection operation. That is, if the SLC block is storing secure information (e.g., RPMB data), the memory system may set the flag associated with the SLC block to indicate that the valid data stored in the SLC block is to remain in an SLC block after the garbage collection. Additionally, if the SLC block is storing other data (e.g., associated with a host system), the memory system may set the flag associated with the SLC block to indicate that the valid data stored in the SLC block may be stored in non-SLC blocks (e.g., MLC, TLC, or QLC blocks) after the garbage collection

Features of the disclosure are initially described in the context of systems with reference toFIGS.1through2. Features of the disclosure are described in the context of a process flow with reference toFIG.3. These and other features of the disclosure are further illustrated by and described in the context of an apparatus diagram and a flowchart that relate to dynamic memory management operation with reference toFIGS.4and5.

FIG.1illustrates an example of a system100that supports dynamic memory management operation in accordance with examples as disclosed herein. The system100includes a host system105coupled with a memory system110.

The memory system controller115may also include a local memory120. In some cases, the local memory120may include read-only memory (ROM) or other memory that may store operating code (e.g., executable instructions) executable by the memory system controller115to perform functions ascribed herein to the memory system controller115. In some cases, the local memory120may additionally or alternatively include static random access memory (SRAM) or other memory that may be used by the memory system controller115for internal storage or calculations, for example, related to the functions ascribed herein to the memory system controller115. Additionally or alternatively, the local memory120may serve as a cache for the memory system controller115. For example, data may be stored in the local memory120if read from or written to a memory device130, and the data may be available within the local memory120for subsequent retrieval for or manipulation (e.g., updating) by the host system105(e.g., with reduced latency relative to a memory device130) in accordance with a cache policy.

A memory device130may include one or more arrays of non-volatile memory cells. For example, a memory device130may include NAND (e.g., NAND flash) memory, ROM, phase change memory (PCM), self-selecting memory, other chalcogenide-based memories, ferroelectric random access memory (RAM) (FeRAM), magnetic RAM (MRAM), NOR (e.g., NOR flash) memory, Spin Transfer Torque (STT)-MRAM, conductive bridging RAM (CBRAM), resistive random access memory (RRAM), oxide based RRAM (OxRAM), electrically erasable programmable ROM (EEPROM), or any combination thereof.

Additionally or alternatively, a memory device130may include one or more arrays of volatile memory cells. For example, a memory device130may include RAM memory cells, such as dynamic RAM (DRAM) memory cells and synchronous DRAM (SDRAM) memory cells.

In some cases, planes165may refer to groups of blocks170, and in some cases, concurrent operations may take place within different planes165. For example, concurrent operations may be performed on memory cells within different blocks170so long as the different blocks170are in different planes165. In some cases, performing concurrent operations in different planes165may be subject to one or more restrictions, such as identical operations being performed on memory cells within different pages175that have the same page address within their respective planes165(e.g., related to command decoding, page address decoding circuitry, or other circuitry being shared across planes165).

In some cases, to update some data within a block170while retaining other data within the block170, the memory device130may copy the data to be retained to a new block170and write the updated data to one or more remaining pages of the new block170. The memory device130(e.g., the local controller135) or the memory system controller115may mark or otherwise designate the data that remains in the old block170as invalid or obsolete and may update a logical-to-physical (L2P) mapping table to associate the logical address (e.g., LBA) for the data with the new, valid block170rather than the old, invalid block170. In some cases, such copying and remapping may be performed instead of erasing and rewriting the entire old block170due to latency or wearout considerations, for example. In some cases, one or more copies of an L2P mapping table may be stored within the memory cells of the memory device130(e.g., within one or more blocks170or planes165) for use (e.g., reference and updating) by the local controller135or memory system controller115.

In some cases, L2P mapping tables may be maintained and data may be marked as valid or invalid at the page level of granularity, and a page175may contain valid data, invalid data, or no data. Invalid data may be data that is outdated due to a more recent or updated version of the data being stored in a different page175of the memory device130. Invalid data may have been previously programmed to the invalid page175but may no longer be associated with a valid logical address, such as a logical address referenced by the host system105. Valid data may be the most recent version of such data being stored on the memory device130. A page175that includes no data may be a page175that has never been written to or that has been erased.

In some cases, a memory system controller115or a local controller135may perform operations (e.g., as part of one or more media management algorithms) for a memory device130, such as wear leveling, background refresh, garbage collection, scrub, block scans, health monitoring, or others, or any combination thereof. For example, within a memory device130, a block170may have some pages175containing valid data and some pages175containing invalid data. To avoid waiting for all of the pages175in the block170to have invalid data in order to erase and reuse the block170, an algorithm referred to as “garbage collection” may be invoked to allow the block170to be erased and released as a free block for subsequent write operations. Garbage collection may refer to a set of media management operations that include, for example, selecting a block170that contains valid and invalid data, selecting pages175in the block that contain valid data, copying the valid data from the selected pages175to new locations (e.g., free pages175in another block170), marking the data in the previously selected pages175as invalid, and erasing the selected block170. As a result, the quantity of blocks170that have been erased may be increased such that more blocks170are available to store subsequent data (e.g., data subsequently received from the host system105).

The system100may include any quantity of non-transitory computer readable media that support dynamic memory management operation. For example, the host system105, the memory system controller115, or a memory device130may include or otherwise may access one or more non-transitory computer readable media storing instructions (e.g., firmware) for performing the functions ascribed herein to the host system105, memory system controller115, or memory device130. For example, such instructions, if executed by the host system105(e.g., by the host system controller106), by the memory system controller115, or by a memory device130(e.g., by a local controller135), may cause the host system105, memory system controller115, or memory device130to perform one or more associated functions as described herein.

In some cases, a memory system controller115or a local controller135may perform memory management operations (e.g., as part of one or more media management algorithms) for a memory device130, such as wear leveling, background refresh, garbage collection, scrub, block scans, health monitoring, or others, or any combination thereof. For example, within a memory device130, a block170may have some pages175containing valid data and some pages175containing invalid data. To avoid waiting for some or all of the pages175in the block170to have invalid data in order to erase and reuse the block170, an algorithm referred to as “garbage collection” may be invoked to allow the block170to be erased and released as a free block for subsequent write operations. Garbage collection may refer to a set of media management operations that include, for example, selecting a block170that contains valid and invalid data, selecting pages175in the block that contain valid data, copying the valid data from the selected pages175to new locations (e.g., free pages175in another block170), marking the data in the previously selected pages175as invalid, and erasing the selected block170. As a result, the number of blocks170that have been erased may be increased such that more blocks170are available to store subsequent data (e.g., data subsequently received from the host system105).

The memory system110may store RPMB data in any of the SLC blocks170of the memory device130(e.g., blocks170-aand170-b). That is, the memory system110may dynamically select one or more SLC blocks170within the memory device130to be RPMBs configured store data securely (e.g., when compared to other blocks170within the memory device). In a case that the memory system110stores RPMB data (e.g., secure information) in an SLC block170(e.g., block170-aor block170-b), the memory system110may first perform an authentication procedure (e.g., provide a key to access the RPMB) prior to accessing the SLC block170. Additionally, the memory system110may generate a copy of the RPMB data stored in the SLC block170(e.g., the dynamic RPMB block170) and store the copied RPMB data in another SLC block170of the memory device130. For example, in a case that memory system110stores RPMB data in SLC block170-aof the memory device130, the memory system110may additionally generate a copy of the RPMB data and store the copied RPMB data in the SLC block170-b. In some cases, generating and storing the copy of the RPMB data may improve a reliability of secure data. For example, the copy of the data may be referenced instead of the original data in cases where the original data becomes corrupted. Further, referencing the copy of the data may have computational advantages as well (e.g., less SRAM used to reference the copy).

In some cases, the memory system110may include one or more dynamic RPMB blocks. That is, the memory system110may include SLC blocks170that may or may not store RPMB data. In a case that the memory system includes dynamic RPMB blocks, prior to executing a garbage collection operation at an SLC block, the memory system may determine whether the SLC block170includes RPMB data (e.g., as opposed to data not associated with an RPMB block) to ensure that the valid RPMB data is stored in another SLC block170(e.g., as opposed to an MLC, TLC, or QLC block) after the execution of the garbage collection operation. For example, the memory system may set a flag associated with each SLC block170to indicate whether the data is to be stored at an SLC block170during a garbage collection operation. That is, if the SLC block170is storing secure information (e.g., RPMB data), the memory system110may set a flag associated with the SLC block170to indicate that the valid data stored in the SLC block170is to remain in the current SLC block or moved to a different SLC block170as part of the garbage collection operation. Additionally, if the SLC block170is storing other data (e.g., associated with a host system105), the memory system110may set the flag associated with the SLC block170to indicate that the valid data stored in the SLC block170may be stored in non-SLC blocks (e.g., MLC, TLC, or QLC blocks) after the garbage collection operation.

FIG.2shows an example of a system200that supports techniques for dynamic memory management operation in accordance with examples as disclosed herein. The system200may be an example of a system100as described with reference toFIG.1or aspects thereof. The system200may include a memory system210configured to store data received from the host system205and to send data to the host system205, if requested by the host system205using access commands (e.g., read commands or write commands). The system200may implement aspects of the system100as described with reference toFIG.1. For example, the host system205, the memory system210, the memory device230, and the blocks270may be examples of systems, devices, and components as described with reference toFIG.1.

In some examples, the memory system210may include a memory device230, which may include a quantity of blocks270. For example, the memory device230may include a block270-a, a block270-b, a block270-c, and a block270-d. Each block270may include a set of memory cells configured to store one or more bits of data. For example, the block270-aand the block270-bmay be examples of SLC blocks270. That is, the blocks270-aand270-bmay include memory cells each configured to store one bit of data. Additionally, the block270-cmay be an example of an MLC block270-cthat includes memory cells configured to store two bits of data, the block270-dmay be an example of a TLC block270-dwith memory cells that are configured to store three bits of data, and the block270-emay be an example of a QLC block270-ewith memory cells configured to store four bits of data.

The memory system210may further include a memory system controller215. The memory system controller may receive access commands (e.g., read commands or write commands) from the host system205. Further, the memory system controller may include a flag220. In some examples, the flag220may indicate whether data stored in any of the quantity of blocks270includes secure information.

The memory system210may store RPMB data in any of the SLC blocks270of the memory device230(e.g., blocks270-aand270-b). That is, the memory system210may dynamically select one or more SLC blocks270within the memory device230to be RPMBs configured store data securely (e.g., when compared to other blocks270within the memory device). In a case that the memory system210stores RPMB data (e.g., secure information) in an SLC block270(e.g., block270-aor block270-b), the memory system210may first perform an authentication procedure (e.g., provide a key to access the RPMB) prior to accessing the SLC block270. Additionally, the memory system210may generate a copy of the RPMB data stored in the SLC block270(e.g., the dynamic RPMB block270) and store the copied RPMB data in another SLC block270of the memory device230. For example, in a case that memory system210stores RPMB data in SLC block270-aof the memory device230, the memory system210may additionally generate a copy of the RPMB data and store the copied RPMB data in the SLC block270-b. In some cases, generating and storing the copy of the RPMB data may improve a reliability of secure data. For example, the copy of the data may be referenced instead of the original data in cases where the original data becomes corrupted. Further, referencing the copy of the data may have computational advantages as well (e.g., less SRAM used to reference the copy).

When storing data in an SLC block270, the memory system210may set a flag220associated with the block270indicating whether the block270is storing secure information (e.g., RPMB data). For example, in a case that the memory system controller215stores data associated with a host system205(e.g., different from RPMB data) in the block270-b, the memory system controller215may set a flag220associated with the block270-bto indicate that the data does not comprise secure information. Additionally, in a case that the memory system controller215stores secure information (e.g., RPMB data) in the block270-b, the memory system controller215may set the flag220associated with the block270-bto indicate that the data does comprise secure information.

The memory system controller215may perform a memory management operation on a block270of the memory device230. For example, the memory system controller215may perform a garbage collection operation on the block270-aof the memory device230. Here, the memory system controller215may identify the valid data stored within the block270-a(e.g., using an L2P table) and may store the valid data from the block270-ain another block270of the memory device230(e.g., block270-b, block270-c, block270-d, or block270-e). Then, the memory system controller215may erase the data stored in the first block270-aof the memory device230.

If the value of the flag220associated with a block270indicates that the valid data in a block270includes secure information (e.g., RPMB data), during an execution of a garbage collection operation the memory system210may store the valid data in a second block270that is configured to store secure information (e.g., an SLC block270-aor270-b). For example, if during a garbage collection operation at block270-a, the memory system210determines that the flag220indicates that the block270-ais storing RPMB data, the memory system210may transfer the RPMB data to another SLC block270-b(e.g., that is configured to store secure information). Additionally or alternatively, if the value of the flag220indicates that the valid data in a block270does not include secure information, during an execution of a garbage collection operation, the memory system210may store the valid data in a second block270that may not be configured to store secure information (e.g., and MLC, TLC, or QLC block270). For example, if during a garbage collection operation at block270-b, the memory system210determines that the flag220indicates that the block270-bis not storing RPMB data, the memory system210may transfer the valid data from block270-bto a block270that includes MLCs, TLCs, or QLCs (e.g., the MLC block270-c, the TLC block270-d, or the QLC block270-e).

FIG.3shows an example diagram of a process flow300that supports dynamic memory management operation as described herein. The features of process flow300may be implemented or performed by a memory system (e.g., the memory system110or the memory system210described with reference toFIGS.1and2, among others) or a component of a memory device such as the memory system controller215or the memory device230, the local memory as described with referenceFIG.2. In the following description of the process flow300, the operations may be performed in different orders or at different times. Some operations may also be omitted from the process flow300, and other operations may be added to the process flow300.

At305, data may be stored in a first SLC block. For example, a memory system may store data in the first SLC block in response to receiving a write command from a host system. In another example, the memory system may generate one or more encryption keys for encrypting data (e.g., data received from the host system) stored in other blocks of the memory system. Here, the memory system may store the one or more encryption keys (e.g., secure information, RPMB data) in the first SLC block. In a case that the memory system stores secure information in the SLC block at305, the first SLC block may function as an RPMB. That is, the memory system may perform one or more authentication procedures prior to accessing the data stored in the first SLC block.

At310, a flag associated with the data may be set. For example, a memory controller may set the flag associated with the data indicating whether the data stored in the first SLC block includes secure information. That is, if at305the memory system stores data associated with the host system in the first SLC block, the memory system may set the flag associated with data to indicate that the data stored in the first SLC block does not include secure information. Additionally, if at305the memory system stores encryption keys (e.g., for encrypting data stored in one or more other blocks of the memory system), the memory system may set the flag to indicate that the data stored in the first SLC block includes secure information (e.g., RPMB data). In some cases, the memory controller may set the flag for any type of data that desires more reliable storage techniques or fewer errors in the stored data.

In some cases, the flag indicating whether the data stored in the first SLC block includes secure information may additionally indicate whether the data is to remain in a block that includes the first SLCs after a memory management operation (e.g., a garbage collection operation). That is, in a case that the flag indicates that the data stored in the first SLC block includes secure information (e.g., the first SLC block is an RPMB), the flag may additionally indicate that the data is to remain in an SLC block after a garbage collection operation. Further, in a case that the flag indicates that the data stored in the SLC block does not include secure information (e.g., the first SLC block is not an RPMB), the flag may additionally indicate that the data may be stored in a different type of block (e.g., an MLC, TLC, or QLC block) after the garbage collection operation.

At315, a copy of the data stored in the first SLC block may optionally be generated and stored in another block of the memory system (e.g., another SLC block, an MLC, TLC, or QLC block). For example, if the first SLC block is an RPMB and the data includes secure information, the memory system may generate a copy of the RPMB data and store the RPMB data in another block of the memory system. This may increase a reliability of the RPMB data storage in the memory system. Additionally, if the first SLC block is not an RPMB (e.g., and is storing data associated with the host system rather than encryption keys for encrypting data at the memory system), the memory system may refrain from generating a copy of the data stored in the first SLC block.

At320, it may be determined to perform a memory management operation at the first SLC block. For example, the memory system may determine to perform a garbage collection operation at the first SLC block to store the valid data within the first SLC block in another block of the memory system and erase the data stored in the first SLC block.

At325, it may be determined whether the flag associated with the data is set. For example, the memory system may read a flag associated with the data stored within the first SLC block to determine whether the data stored within the first SLC block is secure information. In a case that the flag indicates that the data stored in the first SLC block includes secure information and is to remain in an SLC block after an execution of the garbage collection operation, the memory system may proceed to330. Additionally, in a case that the flag indicates that the data stored in the first SLC block does not include secure information and may be stored in a different type of block after the execution of the garbage collection operation, the memory system may proceed to335.

At330, the valid data from the first SLC block may be stored in another SLC block. That is, the memory system may reference an L2P table to identify the valid data stored in the first SLC block and may store that valid data within a second SLC block at the memory system. Here, the second SLC block may then be an RPMB configured to store secure information. That is, in order to access the second SLC block (e.g., that is storing the secure information), the memory system may first perform one or more authentication procedures.

At335, the valid data from the first SLC block may be stored in another SLC, MLC, TLC, or QLC block. That is, the memory system may reference an L2P table to identify the valid data stored in the first SLC block and may store that valid data within another block of the memory system.

At340, the data stored in the first SLC block may be erased. That is, the memory system may erase that data stored in the first SLC after storing the valid data within the first SLC in another block (e.g., at330or335). Here, the memory system may complete an execution of the garbage collection operation.

FIG.4shows a block diagram400of a memory system420that supports dynamic memory management operation in accordance with examples as disclosed herein. The memory system420may be an example of aspects of a memory system as described with reference toFIGS.1through3. The memory system420, or various components thereof, may be an example of means for performing various aspects of dynamic memory management operation as described herein. For example, the memory system420may include a data storage manager425, a flag manager430, a memory management operation component435, a data copy manager440, or any combination thereof. Each of these components may communicate, directly or indirectly, with one another (e.g., via one or more buses).

The data storage manager425may be configured as or otherwise support a means for storing data in a first block that includes a first type of memory cells configured to store a single bit of information. The flag manager430may be configured as or otherwise support a means for setting a flag, associated with the data, indicating whether the data includes secure information and is to remain in a block that includes the first type of memory cells after a memory management operation. The memory management operation component435may be configured as or otherwise support a means for storing, as part of the memory management operation for the first block and based at least in part on the flag, valid data of the first block in a second block that includes the first type of memory cells or a third block that includes a second type of memory cells configured to store two or more bits of information.

In some examples, the data copy manager440may be configured as or otherwise support a means for generating a copy of the data based at least in part on the data including secure information. In some examples, the data storage manager425may be configured as or otherwise support a means for storing the copy of the data in a fourth block that includes the first type of memory cells, where setting the flag associated with the data is based at least in part on storing the copy of the data in the fourth block.

In some examples, to support setting the flag, the flag manager430may be configured as or otherwise support a means for setting the flag to indicate that the data includes secure information and is to remain in a block that includes the first type of memory cells after the memory management operation.

In some examples, to support storing the valid data of the first block, the memory management operation component435may be configured as or otherwise support a means for storing the valid data of the first block in the second block that includes the first type of memory cells configured to store a single bit of information.

In some examples, the first block and the second block each include an RPMB.

In some examples, to support setting the flag, the flag manager430may be configured as or otherwise support a means for setting the flag to indicate that the data is to be stored in a block that includes the second type of memory cells after the memory management operation.

In some examples, to support storing the valid data of the first block, the memory management operation component435may be configured as or otherwise support a means for storing the valid data of the first block in the third block that includes the second type of memory cells configured to store two or more bits of information.

In some examples, to support setting the flag indicating whether the data includes secure information, the flag manager430may be configured as or otherwise support a means for setting the flag indicating whether the data includes one or more encryption keys configured to encrypt data stored in another block.

In some examples, the memory management operation component435may be configured as or otherwise support a means for selecting the second block or the third block for the memory management operation based at least in part on whether the flag indicates that the data includes secure information and is to remain in the block that includes the first type of memory cells after the memory management operation, where storing the valid data of the first block is based at least in part on the selecting.

In some examples, the memory management operation component435may be configured as or otherwise support a means for erasing, as part of the memory management operation for the first block, the data in the first block based at least in part on storing the valid data of the first block in the second block.

In some examples, the memory management operation component435may be configured as or otherwise support a means for determining, as part of the memory management operation, to store the valid data of the first block in the second block that includes the first type of memory cells based at least in part on a value of the flag, where storing the valid data includes storing the valid data of the first block in the second block based at least in part on determining.

FIG.5shows a flowchart illustrating a method500that supports dynamic memory management operation in accordance with examples as disclosed herein. The operations of method500may be implemented by a memory system or its components as described herein. For example, the operations of method500may be performed by a memory system as described with reference toFIGS.1through4. In some examples, a memory system may execute a set of instructions to control the functional elements of the device to perform the described functions. Additionally or alternatively, the memory system may perform aspects of the described functions using special-purpose hardware.

At505, the method may include storing data in a first block that includes a first type of memory cells configured to store a single bit of information. The operations of505may be performed in accordance with examples as disclosed herein. In some examples, aspects of the operations of505may be performed by a data storage manager425as described with reference toFIG.4.

At510, the method may include setting a flag, associated with the data, indicating whether the data includes secure information and is to remain in a block that includes the first type of memory cells after a memory management operation. The operations of510may be performed in accordance with examples as disclosed herein. In some examples, aspects of the operations of510may be performed by a flag manager430as described with reference toFIG.4.

At515, the method may include storing, as part of the memory management operation for the first block and based at least in part on the flag, valid data of the first block in a second block that includes the first type of memory cells or a third block that includes a second type of memory cells configured to store two or more bits of information. The operations of515may be performed in accordance with examples as disclosed herein. In some examples, aspects of the operations of515may be performed by a memory management operation component435as described with reference toFIG.4.

In some examples, an apparatus as described herein may perform a method or methods, such as the method500. The apparatus may include, features, circuitry, logic, means, or instructions (e.g., a non-transitory computer-readable medium storing instructions executable by a processor) for storing data in a first block that includes a first type of memory cells configured to store a single bit of information, setting a flag, associated with the data, indicating whether the data includes secure information and is to remain in a block that includes the first type of memory cells after a memory management operation, and storing, as part of the memory management operation for the first block and based at least in part on the flag, valid data of the first block in a second block that includes the first type of memory cells or a third block that includes a second type of memory cells configured to store two or more bits of information.

Some examples of the method500and the apparatus described herein may further include operations, features, circuitry, logic, means, or instructions for generating a copy of the data based at least in part on the data including secure information and storing the copy of the data in a fourth block that includes the first type of memory cells, where setting the flag associated with the data may be based at least in part on storing the copy of the data in the fourth block.

In some examples of the method500and the apparatus described herein, setting the flag may include operations, features, circuitry, logic, means, or instructions for setting the flag to indicate that the data includes secure information and may be to remain in a block that includes the first type of memory cells after the memory management operation.

In some examples of the method500and the apparatus described herein, storing the valid data of the first block may include operations, features, circuitry, logic, means, or instructions for storing the valid data of the first block in the second block that includes the first type of memory cells configured to store a single bit of information.

In some examples of the method500and the apparatus described herein, the first block and the second block each include an RPMB.

In some examples of the method500and the apparatus described herein, setting the flag may include operations, features, circuitry, logic, means, or instructions for setting the flag to indicate that the data may be to be stored in a block that includes the second type of memory cells after the memory management operation.

In some examples of the method500and the apparatus described herein, storing the valid data of the first block may include operations, features, circuitry, logic, means, or instructions for storing the valid data of the first block in the third block that includes the second type of memory cells configured to store two or more bits of information.

In some examples of the method500and the apparatus described herein, setting the flag indicating whether the data includes secure information may include operations, features, circuitry, logic, means, or instructions for setting the flag indicating whether the data includes one or more encryption keys configured to encrypt data stored in another block.

Some examples of the method500and the apparatus described herein may further include operations, features, circuitry, logic, means, or instructions for selecting the second block or the third block for the memory management operation based at least in part on whether the flag indicates that the data includes secure information and may be to remain in the block that includes the first type of memory cells after the memory management operation, where storing the valid data of the first block may be based at least in part on the selecting.

Some examples of the method500and the apparatus described herein may further include operations, features, circuitry, logic, means, or instructions for erasing, as part of the memory management operation for the first block, the data in the first block based at least in part on storing the valid data of the first block in the second block.

Some examples of the method500and the apparatus described herein may further include operations, features, circuitry, logic, means, or instructions for determining, as part of the memory management operation, to store the valid data of the first block in the second block that includes the first type of memory cells based at least in part on a value of the flag, where storing the valid data includes storing the valid data of the first block in the second block based at least in part on determining.