3 ms·
Didn't realize NAND flash memory couldn't write over itself...ie it is constantly having to use new storage areas
by mpg33 12y ago
Didn't realize NAND flash memory couldn't write over itself...ie it is constantly having to use new storage areas
- gnoway 12y agoIt can write over itself, but does so in pages which are typically larger than the amount of data you want to write. So you have to find a page to write, read it, modify the data in memory, erase the page, then write to it. I think the page size actually varies but wikipedia[1] says 256KB. You also want to spread out your writes anyway, because each NAND cell has a limited number of program/erase cycles before it stops accepting writes. This is why TRIM support was such a big deal a few years ago, since it let the OS communicate when a filesystem block was no longer in use, simplifying the above to erase-then-write or in some cases, just write. [1] https://en.wikipedia.org/wiki/Write_amplification#Basic_SSD_operation https://en.wikipedia.org/wiki/Write_amplification#Basic_SSD_...
- rasz_pl 12y agoYou dont need to erase every time. Erased page is all ones (#FFFFF). If data you modify doesnt need more active bits than it started with you can simply overwrite. This means you can do things like counting down on the same NAND page without erasing every single time. Just make sure you only flip 1s to 0s.