Home
last modified time | relevance | path

Searched refs:sector_size_bytes (Results 1 – 14 of 14) sorted by relevance

/external/pigweed/pw_kvs/
Dsectors.cc46 const size_t sector_size_bytes = partition_.sector_size_bytes(); in Find() local
109 if (!sector->Empty(sector_size_bytes) && sector->HasSpace(size)) { in Find()
111 (sector->RecoverableBytes(sector_size_bytes) == 0)) { in Find()
117 sector_size_bytes) < in Find()
118 sector->RecoverableBytes(sector_size_bytes))) { in Find()
124 if (sector->Empty(sector_size_bytes)) { in Find()
151 unsigned((*found_sector)->RecoverableBytes(sector_size_bytes))); in Find()
168 const size_t sector_size_bytes = partition_.sector_size_bytes(); in FindSectorToGarbageCollect() local
188 (sector.RecoverableBytes(sector_size_bytes) > 0) && in FindSectorToGarbageCollect()
200 if ((sector.RecoverableBytes(sector_size_bytes) > candidate_bytes) && in FindSectorToGarbageCollect()
[all …]
Dfake_flash_memory.cc61 if (address % sector_size_bytes() != 0) { in Erase()
67 const size_t sector_id = address / sector_size_bytes(); in Erase()
68 if (address / sector_size_bytes() + num_sectors > sector_count()) { in Erase()
78 &buffer_[address], int(kErasedValue), sector_size_bytes() * num_sectors); in Erase()
105 if (data.size() > sector_size_bytes() - (address % sector_size_bytes())) { in Write()
112 if (address + data.size() > sector_count() * sector_size_bytes()) { in Write()
117 unsigned(sector_count() * sector_size_bytes())); in Write()
137 if (address > sector_count() * sector_size_bytes()) { in FlashAddressToMcuAddress()
142 unsigned(sector_count() * sector_size_bytes())); in FlashAddressToMcuAddress()
Dflash_partition_test.cc42 const size_t chunks_per_sector = partition.sector_size_bytes() / alignment; in WriteData()
50 sector_index * partition.sector_size_bytes(); in WriteData()
67 sector_index * partition.sector_size_bytes(); in WriteData()
140 std::min(sizeof(test_data), test_partition.sector_size_bytes()); in TEST()
149 sector_index * test_partition.sector_size_bytes(); in TEST()
172 sector_index * test_partition.sector_size_bytes(); in TEST()
186 const size_t sector_size_bytes = test_partition.sector_size_bytes(); in TEST() local
191 EXPECT_LE(kMaxFlashAlignment, sector_size_bytes); in TEST()
192 EXPECT_LE(sector_size_bytes % kMaxFlashAlignment, 0U); in TEST()
228 if (test_partition.sector_size_bytes() == 1) { in TEST()
Dkey_value_store.cc80 const size_t sector_size_bytes = partition_.sector_size_bytes(); in Init() local
83 if (sector_size_bytes > SectorDescriptor::max_sector_size()) { in Init()
86 unsigned(sector_size_bytes), in Init()
127 unsigned(partition_.sector_size_bytes())); in Init()
140 const size_t sector_size_bytes = partition_.sector_size_bytes(); in InitializeMetadata() local
190 sector_size_bytes - (entry_address - sector_address); in InitializeMetadata()
201 sector.set_writable_bytes(sector_size_bytes - in InitializeMetadata()
218 if (sector.Empty(sector_size_bytes)) { in InitializeMetadata()
221 sector_address += sector_size_bytes; in InitializeMetadata()
302 const size_t sector_size = partition_.sector_size_bytes(); in GetStorageStats()
[all …]
Dentry_cache.cc134 size_t sector_size_bytes) const { in AddNewOrUpdateExisting()
169 if (existing_address / sector_size_bytes == address / sector_size_bytes) { in AddNewOrUpdateExisting()
171 unsigned(address / sector_size_bytes)); in AddNewOrUpdateExisting()
Dflash_memory.cc73 PW_TRY(CheckBounds(address, num_sectors * sector_size_bytes())); in Erase()
74 const size_t address_sector_offset = address % sector_size_bytes(); in Erase()
Dflash_partition_with_stats.cc74 size_t base_index = address / FlashPartition::sector_size_bytes(); in Erase()
Dkey_value_store_test.cc427 flash.partition.sector_size_bytes())); in TEST()
430 flash.partition.sector_size_bytes() - sizeof(EntryHeader) - 1; in TEST()
Dkey_value_store_initialized_test.cc412 if (test_partition.sector_size_bytes() < 4 * 1024 || in TEST_F()
Dkey_value_store_binary_format_test.cc718 EXPECT_EQ(OkStatus(), partition_.Erase(partition_.sector_size_bytes(), 1)); in TEST_F()
/external/pigweed/pw_kvs/public/pw_kvs/internal/
Dsectors.h74 bool Empty(size_t sector_size_bytes) const { in Empty() argument
75 return writable_bytes() == sector_size_bytes; in Empty()
80 size_t RecoverableBytes(size_t sector_size_bytes) const { in RecoverableBytes() argument
81 return sector_size_bytes - valid_bytes_ - writable_bytes(); in RecoverableBytes()
92 explicit constexpr SectorDescriptor(uint16_t sector_size_bytes) in SectorDescriptor() argument
93 : tail_free_bytes_(sector_size_bytes), valid_bytes_(0) {} in SectorDescriptor()
116 SectorDescriptor(partition_.sector_size_bytes())); in Reset()
138 const Address sector_end = sector_base + partition_.sector_size_bytes(); in AddressInSector()
145 return Index(sector) * partition_.sector_size_bytes(); in BaseAddress()
151 return descriptors_[address / partition_.sector_size_bytes()]; in FromAddress()
[all …]
Dentry_cache.h184 size_t sector_size_bytes) const;
/external/pigweed/pw_kvs/public/pw_kvs/
Dflash_memory.h112 constexpr size_t sector_size_bytes() const { return sector_size_; } in sector_size_bytes() function
252 virtual size_t sector_size_bytes() const { in sector_size_bytes() function
253 return flash_.sector_size_bytes(); in sector_size_bytes()
256 size_t size_bytes() const { return sector_count() * sector_size_bytes(); } in size_bytes()
274 (start_sector_index_ - flash_.start_sector()) * sector_size_bytes() + in PartitionToFlashAddress()
Dkey_value_store.h329 return max_key_value_size_bytes(partition_.sector_size_bytes()); in max_key_value_size_bytes()