/aosp12/packages/modules/Virtualization/authfs/src/fsverity/ |
H A D | builder.rs | 18 use crate::common::{divide_roundup, CHUNK_SIZE}; 22 const HASH_PER_PAGE: usize = CHUNK_SIZE as usize / HASH_SIZE; 66 let leaves_size = divide_roundup(new_file_size, CHUNK_SIZE); in resize() 114 let size_for_equivalent = n as u64 * CHUNK_SIZE; in calculate_root_hash() 200 tree.update_hash(1, &hash, CHUNK_SIZE * 2); in merkle_tree_non_sequential() 201 tree.update_hash(3, &hash, CHUNK_SIZE * 4); in merkle_tree_non_sequential() 202 tree.update_hash(0, &hash, CHUNK_SIZE); in merkle_tree_non_sequential() 203 tree.update_hash(2, &hash, CHUNK_SIZE * 3); in merkle_tree_non_sequential() 232 tree.update_hash(0, &[42; HASH_SIZE], CHUNK_SIZE); in merkle_tree_shrink_leaves() 233 tree.update_hash(0, &[42; HASH_SIZE], CHUNK_SIZE * 3); in merkle_tree_shrink_leaves() [all …]
|
H A D | verifier.rs | 23 use crate::common::{divide_roundup, CHUNK_SIZE}; 27 const ZEROS: [u8; CHUNK_SIZE as usize] = [0u8; CHUNK_SIZE as usize]; 50 let chunk_hash = hash_with_padding(&chunk, CHUNK_SIZE as usize)?; in verity_check() 61 Ok(hash_with_padding(&merkle_chunk, CHUNK_SIZE as usize)?) in verity_check() 76 let hashes_per_node = CHUNK_SIZE / Sha256Hasher::HASH_SIZE as u64; 83 let leaves_size_per_hash = CHUNK_SIZE * leaves_per_hash; 86 let level_size = nodes_at_level * CHUNK_SIZE; 97 let chunk_index = global_hash_offset / CHUNK_SIZE; 98 let hash_offset_in_chunk = (global_hash_offset % CHUNK_SIZE) as usize; 143 let mut buf = [0u8; CHUNK_SIZE as usize]; in new()
|
H A D | editor.rs | 59 use crate::common::{ChunkedSizeIter, CHUNK_SIZE}; 108 let mut orig_data = [0u8; CHUNK_SIZE as usize]; in new_hash_for_incomplete_write() 137 if current_size as u64 == CHUNK_SIZE { in new_chunk_hash() 173 ChunkedSizeIter::new(buf.len(), offset, CHUNK_SIZE as usize) in write_at() 181 let output_chunk_index = (output_offset / CHUNK_SIZE) as usize; in write_at() 233 if size < merkle_tree.file_size() && size % CHUNK_SIZE > 0 { in resize() 234 let new_tail_size = (size % CHUNK_SIZE) as usize; in resize() 235 let chunk_index = size / CHUNK_SIZE; in resize() 237 let mut buf: ChunkBuffer = [0; CHUNK_SIZE as usize]; in resize() 241 let zeros = vec![0; CHUNK_SIZE as usize - new_tail_size]; in resize() [all …]
|
H A D | common.rs | 22 use crate::common::{divide_roundup, CHUNK_SIZE}; 50 let hashes_per_node = CHUNK_SIZE / Sha256Hasher::HASH_SIZE as u64; in merkle_tree_height() 51 let hash_pages = divide_roundup(data_size, hashes_per_node * CHUNK_SIZE); in merkle_tree_height()
|
/aosp12/frameworks/base/core/java/android/util/apk/ |
H A D | ReadFileDataSource.java | 36 private static final int CHUNK_SIZE = 1024 * 1024; field in ReadFileDataSource 60 final byte[] buffer = new byte[Math.min(size, CHUNK_SIZE)]; in feedIntoDataDigester() 63 for (long pos = start, curSize = Math.min(size, CHUNK_SIZE); in feedIntoDataDigester() 64 pos < end; curSize = Math.min(end - pos, CHUNK_SIZE)) { in feedIntoDataDigester()
|
/aosp12/frameworks/compile/mclinker/unittests/ |
H A D | LinearAllocatorTest.cpp | 18 m_pTestee = new LinearAllocator<Data, CHUNK_SIZE>(); in LinearAllocatorTest() 40 ASSERT_EQ(CHUNK_SIZE, m_pTestee->max_size()); in TEST_F() 47 ASSERT_EQ(CHUNK_SIZE, m_pTestee->max_size()); in TEST_F() 52 Data* pointer = m_pTestee->allocate(CHUNK_SIZE + 1); in TEST_F()
|
H A D | RTLinearAllocatorTest.cpp | 18 m_pTestee = new LinearAllocator<Data, 0>(CHUNK_SIZE); in RTLinearAllocatorTest() 41 ASSERT_TRUE(CHUNK_SIZE == m_pTestee->max_size()); in TEST_F() 48 ASSERT_TRUE(CHUNK_SIZE == m_pTestee->max_size()); in TEST_F() 53 Data* pointer = m_pTestee->allocate(CHUNK_SIZE + 1); in TEST_F()
|
H A D | LinearAllocatorTest.h | 64 enum TemplateArgsType { CHUNK_SIZE = 32 }; enumerator 65 typedef mcld::LinearAllocator<Data, CHUNK_SIZE> Alloc;
|
H A D | RTLinearAllocatorTest.h | 62 enum { CHUNK_SIZE = 32 }; enumerator
|
/aosp12/packages/modules/Virtualization/authfs/src/file/ |
H A D | local_file.rs | 23 use crate::common::CHUNK_SIZE; 45 let start = chunk_index * CHUNK_SIZE; in read_chunk() 49 let end = min(self.size, start + CHUNK_SIZE); in read_chunk()
|
H A D | remote_file.rs | 23 use crate::common::CHUNK_SIZE; 36 let offset = i64::try_from(chunk_index * CHUNK_SIZE) in remote_read_chunk() 82 let offset = i64::try_from(chunk_index * CHUNK_SIZE) in read_chunk()
|
/aosp12/packages/modules/Virtualization/authfs/src/ |
H A D | fusefs.rs | 36 use crate::common::{divide_roundup, ChunkedSizeIter, CHUNK_SIZE}; 104 fn blk_size() -> libc::c_int { CHUNK_SIZE as libc::c_int } 106 fn blk_size() -> libc::c_long { CHUNK_SIZE as libc::c_long } 139 offset / CHUNK_SIZE in offset_to_chunk_index() 151 let total = ChunkedSizeIter::new(size_to_read, offset, CHUNK_SIZE as usize).try_fold( in read_chunks() 158 let mut buf = [0u8; CHUNK_SIZE as usize]; in read_chunks() 164 let begin = (current_offset % CHUNK_SIZE) as usize; in read_chunks()
|
H A D | file.rs | 9 use crate::common::CHUNK_SIZE; 20 pub type ChunkBuffer = [u8; CHUNK_SIZE as usize];
|
H A D | common.rs | 18 pub const CHUNK_SIZE: u64 = 4096; const
|
/aosp12/system/core/fs_mgr/libsnapshot/include/libsnapshot/ |
H A D | snapuserd_kernel.h | 47 static constexpr uint32_t CHUNK_SIZE = 8; variable 48 static constexpr uint32_t CHUNK_SHIFT = (__builtin_ffs(CHUNK_SIZE) - 1);
|
/aosp12/build/make/tools/product_config/src/com/android/build/config/ |
H A D | CsvParser.java | 36 private static final int CHUNK_SIZE = 64 * 1024; field in CsvParser 116 char[] buf = new char[CHUNK_SIZE]; in parse() 202 buf = new char[old.length + CHUNK_SIZE]; in parse()
|
/aosp12/build/make/tools/ |
H A D | compare_builds.py | 509 CHUNK_SIZE = 32*1024 513 size = min(CHUNK_SIZE, remaining) 514 if first_file.read(CHUNK_SIZE) != second_file.read(CHUNK_SIZE):
|
/aosp12/packages/modules/adb/client/ |
H A D | incremental.cpp | 230 std::vector<char> child_stdout(CHUNK_SIZE); in wait_for_installation() 257 child_stdout.resize(buf_size + CHUNK_SIZE); in wait_for_installation()
|
H A D | commandline.cpp | 831 int opt = CHUNK_SIZE; in adb_sideload_legacy() 834 char buf[CHUNK_SIZE]; in adb_sideload_legacy() 837 unsigned xfer = (size > CHUNK_SIZE) ? CHUNK_SIZE : size; in adb_sideload_legacy() 862 #define SIDELOAD_HOST_BLOCK_SIZE (CHUNK_SIZE)
|
/aosp12/frameworks/base/core/tests/coretests/src/android/app/ |
H A D | DownloadManagerBaseTest.java | 614 final int CHUNK_SIZE = 1000000; // copy random data in 1000000-char chunks in createFileOnSD() local 616 int nextChunkSize = CHUNK_SIZE; in createFileOnSD() 623 if (remaining < CHUNK_SIZE) { in createFileOnSD() 629 remaining -= CHUNK_SIZE; in createFileOnSD()
|
/aosp12/packages/modules/adb/ |
H A D | adb.h | 207 #define CHUNK_SIZE (64 * 1024) macro
|
H A D | adb_listeners.cpp | 82 int rcv_buf_size = CHUNK_SIZE; in ss_listener_event_func()
|
/aosp12/packages/modules/DnsResolver/ |
H A D | DnsTlsSocket.cpp | 644 constexpr uint16_t CHUNK_SIZE = 2048; in readResponse() local 645 std::vector<uint8_t> discard(std::min(remainingBytes, CHUNK_SIZE)); in readResponse()
|
/aosp12/system/core/fs_mgr/libsnapshot/ |
H A D | snapuserd_worker.cpp | 82 exceptions_per_area_ = (CHUNK_SIZE << SECTOR_SHIFT) / sizeof(struct disk_exception); in WorkerThread() 130 dh->chunk_size = CHUNK_SIZE; in ConstructKernelCowHeader()
|
H A D | snapuserd.cpp | 366 exceptions_per_area_ = (CHUNK_SIZE << SECTOR_SHIFT) / sizeof(struct disk_exception); in ReadMetadata()
|