Home
last modified time | relevance | path

Searched refs:chunk (Results 1 – 20 of 20) sorted by relevance

/system/core/logd/
DSerializedLogChunkTest.cpp29 auto chunk = SerializedLogChunk{chunk_size}; in TEST()
30 EXPECT_EQ(chunk_size + sizeof(SerializedLogChunk), chunk.PruneSize()); in TEST()
34 ASSERT_TRUE(chunk.CanLog(expected_total_len)); in TEST()
35 EXPECT_TRUE(chunk.CanLog(chunk_size)); in TEST()
36 EXPECT_FALSE(chunk.CanLog(chunk_size + 1)); in TEST()
39 auto* entry = chunk.Log(1234, time, 0, 1, 2, log_message, sizeof(log_message)); in TEST()
51 EXPECT_FALSE(chunk.CanLog(chunk_size)); in TEST()
52 EXPECT_EQ(static_cast<int>(expected_total_len), chunk.write_offset()); in TEST()
53 EXPECT_EQ(1234U, chunk.highest_sequence_number()); in TEST()
60 auto chunk = SerializedLogChunk{chunk_size}; in TEST()
[all …]
DSerializedLogBuffer.cpp118 void SerializedLogBuffer::RemoveChunkFromStats(log_id_t log_id, SerializedLogChunk& chunk) { in RemoveChunkFromStats() argument
119 chunk.IncReaderRefCount(); in RemoveChunkFromStats()
121 while (read_offset < chunk.write_offset()) { in RemoveChunkFromStats()
122 auto* entry = chunk.log_entry(read_offset); in RemoveChunkFromStats()
126 chunk.DecReaderRefCount(); in RemoveChunkFromStats()
130 log_id_t log_id, const std::list<SerializedLogChunk>::iterator& chunk) { in NotifyReadersOfPrune() argument
133 state.Prune(log_id, chunk); in NotifyReadersOfPrune()
304 for (const auto& chunk : logs_[id]) { in GetSizeUsed() local
305 total_size += chunk.PruneSize(); in GetSizeUsed()
DSerializedFlushToStateTest.cpp152 auto chunk = SerializedLogChunk{kChunkSize}; in AddChunkWithMessages()
156 ASSERT_TRUE(chunk.CanLog(message.size() + 1)); in AddChunkWithMessages()
157 chunk.Log(sequence, log_time(), 0, 1, 1, message.c_str(), message.size() + 1); in AddChunkWithMessages()
160 chunk.FinishWriting(); in AddChunkWithMessages()
162 log_chunks_[buffer].emplace_back(std::move(chunk)); in AddChunkWithMessages()
DSerializedLogBuffer.h61 void NotifyReadersOfPrune(log_id_t log_id, const std::list<SerializedLogChunk>::iterator& chunk)
63 void RemoveChunkFromStats(log_id_t log_id, SerializedLogChunk& chunk);
/system/memory/libmemunreachable/
DAllocator.cpp81 void MoveToFullList(Chunk* chunk, int bucket_);
82 void MoveToFreeList(Chunk* chunk, int bucket_);
90 void MoveToList(Chunk* chunk, LinkedList<Chunk*>* head);
343 Chunk* chunk = free_chunks_[i].next()->data(); in ~HeapImpl() local
344 chunk->node_.remove(); in ~HeapImpl()
345 delete chunk; in ~HeapImpl()
348 Chunk* chunk = full_chunks_[i].next()->data(); in ~HeapImpl() local
349 chunk->node_.remove(); in ~HeapImpl()
350 delete chunk; in ~HeapImpl()
366 Chunk* chunk = new Chunk(this, bucket); in AllocLocked() local
[all …]
/system/core/trusty/storage/lib/
Dstorage.c206 size_t chunk = MAX_CHUNK_SIZE; in storage_read() local
210 if (chunk > size) in storage_read()
211 chunk = size; in storage_read()
212 rc = _read_chunk(fh, off, ptr, chunk); in storage_read()
243 size_t chunk = MAX_CHUNK_SIZE; in storage_write() local
248 if (chunk >= size) { in storage_write()
250 chunk = size; in storage_write()
253 rc = _write_req(fh, off, ptr, chunk, msg_flags); in storage_write()
256 if ((size_t)rc != chunk) { in storage_write()
260 off += chunk; in storage_write()
[all …]
/system/keymaster/km_openssl/
Dckdf.cpp93 for (size_t chunk = 0; chunk < num_chunks; ++chunk) { in DEFINE_OPENSSL_OBJECT_POINTER() local
94 if (!CMAC_Update(ctx.get(), context_chunks[chunk].data, in DEFINE_OPENSSL_OBJECT_POINTER()
95 context_chunks[chunk].data_length)) { in DEFINE_OPENSSL_OBJECT_POINTER()
Dsoft_keymaster_enforcement.cpp109 auto& chunk = data_chunks[i]; in hmacSha256() local
110 if (!HMAC_Update(ctx.get(), chunk.data, chunk.data_length)) { in hmacSha256()
/system/core/fs_mgr/libsnapshot/
Dpower_test.cpp189 uint8_t chunk[4096]; in Create() local
193 size_t bytes = (size_t)std::min((uint64_t)sizeof(chunk), remaining); in Create()
194 if (!android::base::ReadFully(second_fd, chunk, bytes)) { in Create()
198 if (!android::base::WriteFully(snap_fd, chunk, bytes)) { in Create()
290 uint8_t chunk[4096]; in SetupImages() local
294 size_t bytes = (size_t)std::min((uint64_t)sizeof(chunk), remaining); in SetupImages()
295 if (!android::base::ReadFully(first_fd, chunk, bytes)) { in SetupImages()
299 if (!android::base::WriteFully(image_fd, chunk, bytes)) { in SetupImages()
317 memset(chunk, 0, sizeof(chunk)); in SetupImages()
318 if (!android::base::WriteFully(cow_fd, chunk, sizeof(chunk))) { in SetupImages()
/system/core/libsparse/
Dsparse_read.cpp106 int chunk; in GetCrc32() local
109 chunk = std::min(len, COPY_BUF_SIZE); in GetCrc32()
110 ret = read_all(fd, copybuf, chunk); in GetCrc32()
114 *crc32 = sparse_crc32(*crc32, copybuf, chunk); in GetCrc32()
115 len -= chunk; in GetCrc32()
209 int chunk; in process_fill_chunk() local
237 chunk = std::min(len, COPY_BUF_SIZE); in process_fill_chunk()
238 *crc32 = sparse_crc32(*crc32, copybuf, chunk); in process_fill_chunk()
239 len -= chunk; in process_fill_chunk()
258 int chunk = std::min(len, COPY_BUF_SIZE); in process_skip_chunk() local
[all …]
/system/core/adb/
DSYNC.TXT60 After this the actual file is sent in chunks. Each chunk has the following
62 A sync request with id "DATA" and length equal to the chunk size. After
63 follows chunk size number of bytes. This is repeated until the file is
64 transferred. Each chunk must not be larger than 64k.
68 request (but not to chunk requests) with an "OKAY" sync response (length can
76 the chunk size. After follows chunk size number of bytes. This is repeated
77 until the file is transferred. Each chunk will not be larger than 64k.
/system/media/audio_utils/
Dtinysndfile.c115 unsigned char chunk[8]; in sf_open_read() local
116 actual = fread(chunk, sizeof(char), sizeof(chunk), stream); in sf_open_read()
117 if (actual != sizeof(chunk)) { in sf_open_read()
119 fprintf(stderr, "actual %zu != %zu\n", actual, sizeof(chunk)); in sf_open_read()
124 unsigned chunkSize = little4u(&chunk[4]); in sf_open_read()
131 if (!memcmp(&chunk[0], "fmt ", 4)) { in sf_open_read()
230 } else if (!memcmp(&chunk[0], "data", 4)) { in sf_open_read()
250 } else if (!memcmp(&chunk[0], "fact", 4)) { in sf_open_read()
259 chunk[0], chunk[1], chunk[2], chunk[3]); in sf_open_read()
/system/incremental_delivery/incfs/
DMountRegistry.cpp297 auto chunk = std::string_view{nextLine, size_t(readEnd - nextLine)}; in forEachLine()
299 auto lineEnd = chunk.find('\n'); in forEachLine()
300 if (lineEnd == chunk.npos) { in forEachLine()
303 cb(chunk.substr(0, lineEnd)); in forEachLine()
304 chunk.remove_prefix(lineEnd + 1); in forEachLine()
305 } while (!chunk.empty()); in forEachLine()
307 const auto remainingSize = readEnd - chunk.end(); in forEachLine()
308 memmove(buffer, chunk.end(), remainingSize); in forEachLine()
/system/update_engine/scripts/
Dpayload_info.py45 chunk = bytearray(data[off:off + 16])
47 ' '.join('%.2x' % c for c in chunk) +
48 ' ' * (16 - len(chunk)) +
50 ''.join(chr(c) if 32 <= c < 127 else '.' for c in chunk))
/system/apex/apexer/
Dapexer_test.py118 chunk = file.read(h.block_size)
119 if not chunk:
121 h.update(chunk)
/system/security/identity/
DCredential.cpp445 vector<uint8_t> chunk; in getEntries() local
446 status = halBinder_->retrieveEntryValue(encryptedChunk, &chunk); in getEntries()
450 value.insert(value.end(), chunk.begin(), chunk.end()); in getEntries()
DWritableCredential.cpp219 for (const auto& chunk : chunks) { in personalize() local
221 status = halBinder_->addEntryValue(chunk, &encryptedChunk); in personalize()
/system/extras/pagecache/
Dpagecache.py152 chunk = self._file_object.read(self._chunk_size)
153 if not chunk:
155 self._output_queue.put(chunk)
/system/extras/ioshark/
Dioshark_bench.c542 static int chunk = 0; in get_start_end() local
586 if (chunk > 0 || i < num_input_files) { in get_start_end()
588 chunk++, fssize_clamp_next_index, i - 1); in get_start_end()
/system/vold/
DBenchmarkGen.h4049 int chunk = std::min(len, 65536); in CreateFile() local
4053 if (android::vold::ReadRandomBytes(chunk, buf) != OK) { in CreateFile()
4063 int n = write(out, buf.c_str(), std::min(len, chunk)); in CreateFile()