1. A data storage device comprising: a non-volatile memory array comprising a plurality of non-volatile memory devices; and a memory controller configured to: write raw data to a memory unit of the non-volatile memory array; write, in connection with the writing of the raw data, metadata to a memory indicating a number of bits of the written raw data; read, after the write, the raw data and metadata from memory unit; determine a difference between the read raw data and the number of bits of the written raw data indicated by the read metadata; and determine a measure of data retention for the memory unit based on the determined difference.