TDBStore: optimize erase algorithms
Currently `TDBStore::offset_in_erase_unit()` and `TDBStore::check_erase_before_write()` loop through erase units one-by-one, until the entire range is covered. This is very inefficient when the erase size is tiny, e.g. one-byte on a non-flash device for which we use program as erase. This commit reworks the algorithms, based on the fact that a block device can erase or program as many units as needed in one go. |
---|
|
storage/kvstore/tdbstore/include/tdbstore/TDBStore.h |
---|
storage/kvstore/tdbstore/source/TDBStore.cpp |
---|