Home
last modified time | relevance | path

Searched refs:file_size (Results 1 – 25 of 31) sorted by relevance

12

/system/extras/tests/pagingtest/
Dpageinout_test.c12 int pageinout_test(int test_runs, bool cache, unsigned long long file_size) { in pageinout_test() argument
27 fd = create_tmp_file(tmpname, file_size); in pageinout_test()
32 vec = alloc_mincore_vec(file_size); in pageinout_test()
37 buf = mmap(NULL, file_size, PROT_READ, MAP_PRIVATE, fd, 0); in pageinout_test()
43 if (!check_caching((void *)buf, vec, file_size, false)) { in pageinout_test()
49 rc = madvise((void *)buf, file_size, MADV_RANDOM) || in pageinout_test()
50 posix_fadvise(fd, 0, file_size, POSIX_FADV_RANDOM); in pageinout_test()
59 for (j = 0; j < file_size; j += pagesize) { in pageinout_test()
67 if (!check_caching((void *)buf, vec, file_size, true)) { in pageinout_test()
72 rc = madvise((void *)buf, file_size, MADV_DONTNEED) || in pageinout_test()
[all …]
Dpagingtest.c142 unsigned long long file_size = 0ULL; in main() local
160 file_size = strtoull(argv[3], NULL, 10); in main()
162 if (!file_size) { in main()
163 file_size = FILE_SIZE; in main()
170 rc = pageinout_test(test_runs, true, file_size); in main()
174 rc = pageinout_test(test_runs, false, file_size); in main()
Dpagingtest.h17 int pageinout_test(int test_runs, bool cache, unsigned long long file_size);
/system/core/libprocessgroup/cgrouprc/
Dcgroup_file.cpp50 size_t file_size = sb.st_size; in LoadRcFile() local
51 if (file_size < sizeof(CgroupFile)) { in LoadRcFile()
56 CgroupFile* file_data = (CgroupFile*)mmap(nullptr, file_size, PROT_READ, MAP_SHARED, fd, 0); in LoadRcFile()
64 munmap(file_data, file_size); in LoadRcFile()
69 if (file_size != expected) { in LoadRcFile()
71 << ", actual " << file_size; in LoadRcFile()
72 munmap(file_data, file_size); in LoadRcFile()
/system/core/fs_mgr/libfs_avb/tests/
Dbasic_test.cpp33 int64_t file_size; in TEST_F() local
34 ASSERT_TRUE(base::GetFileSize(boot_path, &file_size)); in TEST_F()
35 EXPECT_EQ(file_size, image_size); in TEST_F()
78 int64_t file_size; in TEST_F() local
79 ASSERT_TRUE(base::GetFileSize(boot_path, &file_size)); in TEST_F()
80 EXPECT_EQ(file_size, image_size); in TEST_F()
115 int64_t file_size; in TEST_F() local
116 ASSERT_TRUE(base::GetFileSize(system_path, &file_size)); in TEST_F()
117 EXPECT_EQ(file_size, image_size); in TEST_F()
Dfs_avb_test_util.cpp109 int64_t file_size; in GenerateVBMetaImage() local
110 EXPECT_TRUE(base::GetFileSize(vbmeta_image.path, &file_size)); in GenerateVBMetaImage()
111 vbmeta_image.content.resize(file_size); in GenerateVBMetaImage()
113 reinterpret_cast<char*>(vbmeta_image.content.data()), file_size)); in GenerateVBMetaImage()
131 int64_t file_size; in ExtractVBMetaImage() local
132 EXPECT_TRUE(base::GetFileSize(vbmeta_image.path, &file_size)); in ExtractVBMetaImage()
133 vbmeta_image.content.resize(file_size); in ExtractVBMetaImage()
135 reinterpret_cast<char*>(vbmeta_image.content.data()), file_size)); in ExtractVBMetaImage()
Davb_util_test.cpp164 int64_t file_size; in TEST_F() local
165 ASSERT_TRUE(base::GetFileSize(image_path, &file_size)); in TEST_F()
166 EXPECT_EQ(image_size, file_size); in TEST_F()
194 int64_t file_size; in TEST_F() local
195 ASSERT_TRUE(base::GetFileSize(system_path, &file_size)); in TEST_F()
196 EXPECT_EQ(image_size, file_size); in TEST_F()
204 ASSERT_TRUE(base::GetFileSize(system_path, &file_size)); in TEST_F()
205 EXPECT_EQ(partition_size, file_size); in TEST_F()
708 int64_t file_size; in ModifyFile() local
709 ASSERT_TRUE(base::GetFileSize(file_path, &file_size)); in ModifyFile()
[all …]
/system/core/fs_mgr/libfiemap_writer/
Dfiemap_writer.cpp199 static bool PerformFileChecks(const std::string& file_path, uint64_t file_size, uint64_t* blocksz, in PerformFileChecks() argument
225 if (available_bytes <= file_size) { in PerformFileChecks()
226 LOG(ERROR) << "Not enough free space in file system to create file of size : " << file_size; in PerformFileChecks()
235 static bool FallocateFallback(int file_fd, uint64_t block_size, uint64_t file_size, in FallocateFallback() argument
242 uint64_t bytes_per_chunk = std::max(file_size / 1000, block_size); in FallocateFallback()
247 off_t end = static_cast<off_t>(file_size); in FallocateFallback()
264 if (on_progress && !on_progress(cursor, file_size)) { in FallocateFallback()
272 uint64_t file_size, unsigned int fs_type, in AllocateFile() argument
281 if (fallocate(file_fd, FALLOC_FL_ZERO_RANGE, 0, file_size)) { in AllocateFile()
283 << " size: " << file_size; in AllocateFile()
[all …]
Dsplit_fiemap_writer.cpp45 std::unique_ptr<SplitFiemap> SplitFiemap::Create(const std::string& file_path, uint64_t file_size, in Create() argument
48 if (!file_size) { in Create()
66 int new_permille = (actual_written * 1000) / file_size; in Create()
67 if (new_permille != permille && actual_written < file_size) { in Create()
68 if (progress && !progress(actual_written, file_size)) { in Create()
81 uint64_t remaining_bytes = file_size; in Create()
84 LOG(ERROR) << "Requested size " << file_size << " created too many split files"; in Create()
/system/update_engine/payload_generator/
Dmapfile_filesystem.cc48 off_t file_size = utils::FileSize(filename); in CreateFromFile() local
49 if (file_size < 0) in CreateFromFile()
52 if (file_size % kMapfileBlockSize) { in CreateFromFile()
53 LOG(ERROR) << "Image file " << filename << " has a size of " << file_size in CreateFromFile()
57 off_t num_blocks = file_size / kMapfileBlockSize; in CreateFromFile()
Dboot_img_filesystem.cc88 const uint64_t file_size = utils::FileSize(filename_); in GetFiles() local
91 if (hdr_.kernel_size > 0 && offset + hdr_.kernel_size <= file_size) { in GetFiles()
95 if (hdr_.ramdisk_size > 0 && offset + hdr_.ramdisk_size <= file_size) { in GetFiles()
Dpayload_signer.cc447 uint64_t file_size = utils::FileSize(payload_path); in ExtractPayloadProperties() local
448 properties->SetString(kPayloadPropertyFileSize, std::to_string(file_size)); in ExtractPayloadProperties()
454 HashCalculator::RawHashOfFile(payload_path, file_size, &file_hash) == in ExtractPayloadProperties()
455 static_cast<off_t>(file_size)); in ExtractPayloadProperties()
/system/sepolicy/tools/
Dversion_policy.c34 uint32_t file_size; in read_cil_file() local
48 file_size = filedata.st_size; in read_cil_file()
49 buff = malloc(file_size); in read_cil_file()
55 rc = fread(buff, file_size, 1, file); in read_cil_file()
65 rc = cil_add_file(*db, path, buff, file_size); in read_cil_file()
/system/extras/pagecache/
Ddumpcache.c24 size_t file_size; member
43 static struct file_info *get_file_info(const char* fpath, size_t file_size) { in get_file_info() argument
68 info->file_size = file_size; in get_file_info()
163 (100 * info->num_cached_pages * g_page_size) / info->file_size); in main()
/system/extras/libfec/include/fec/
Decc.h57 inline uint64_t fec_ecc_get_size(uint64_t file_size, int roots) in fec_ecc_get_size() argument
59 return fec_div_round_up(fec_div_round_up(file_size, FEC_BLOCKSIZE), in fec_ecc_get_size()
/system/extras/simpleperf/
Dread_elf.h45 uint32_t file_size, BuildId* build_id);
66 uint32_t file_size, const BuildId& expected_build_id,
79 uint32_t file_size,
Dread_elf.cpp184 uint64_t file_size, BinaryWrapper* wrapper) { in OpenObjectFile() argument
189 if (file_size == 0) { in OpenObjectFile()
190 file_size = GetFileSize(filename); in OpenObjectFile()
191 if (file_size == 0) { in OpenObjectFile()
195 auto buffer_or_err = llvm::MemoryBuffer::getOpenFileSlice(fd, filename, file_size, file_offset); in OpenObjectFile()
236 uint32_t file_size, BuildId* build_id) { in GetBuildIdFromEmbeddedElfFile() argument
238 ElfStatus result = OpenObjectFile(filename, file_offset, file_size, &wrapper); in GetBuildIdFromEmbeddedElfFile()
449 uint32_t file_size, const BuildId& expected_build_id, in ParseSymbolsFromEmbeddedElfFile() argument
452 ElfStatus result = OpenObjectFile(filename, file_offset, file_size, &wrapper); in ParseSymbolsFromEmbeddedElfFile()
546 uint32_t file_size, in ReadMinExecutableVirtualAddressFromEmbeddedElfFile() argument
[all …]
Dtracing.cpp64 uint64_t file_size = file.size(); in AppendFile() local
65 AppendData(data, file_size); in AppendFile()
67 uint32_t file_size = file.size(); in AppendFile() local
68 AppendData(data, file_size); in AppendFile()
75 uint64_t file_size = ConvertBytesToValue(p, file_size_bytes); in DetachFile() local
78 file.insert(file.end(), p, p + file_size); in DetachFile()
79 p += file_size; in DetachFile()
/system/tools/aidl/
Dio_delegate.cpp95 ssize_t file_size = in.tellg(); in GetFileContents() local
96 contents->resize(file_size + content_suffix.length()); in GetFileContents()
99 in.read(&(*contents)[0], file_size); in GetFileContents()
101 contents->replace(file_size, content_suffix.length(), content_suffix); in GetFileContents()
/system/extras/libfec/
Dfec_open.cpp41 static int find_offset(uint64_t file_size, int roots, uint64_t *offset, in find_offset() argument
48 if (file_size % FEC_BLOCKSIZE) { in find_offset()
55 uint64_t mi = get_appr_size(file_size, roots); in find_offset()
56 uint64_t lo = file_size - mi * 2; in find_offset()
57 uint64_t hi = file_size - mi / 2; in find_offset()
63 if (total < file_size) { in find_offset()
65 } else if (total > file_size) { in find_offset()
69 debug("file_size = %" PRIu64 " -> offset = %" PRIu64, file_size, in find_offset()
/system/update_engine/scripts/
Dupdate_device.py95 self.size = payload_info.file_size
108 def _parse_range(range_str, file_size): argument
119 end_range = file_size
129 if int(e) < file_size:
130 start_range = file_size - int(e)
/system/core/trusty/storage/lib/include/trusty/lib/
Dstorage.h130 int storage_set_file_size(file_handle_t handle, storage_off_t file_size,
/system/core/libunwindstack/tests/
DMemoryFileTest.cpp128 uint64_t file_size = 2 * pagesize + pagesize / 2; in TEST_F() local
129 for (size_t i = 0; i < file_size; i++) { in TEST_F()
135 ASSERT_FALSE(memory_.Init(tf_->path, file_size + 2 * pagesize)); in TEST_F()
137 ASSERT_FALSE(memory_.Init(tf_->path, file_size)); in TEST_F()
/system/core/fs_mgr/libfiemap_writer/include/libfiemap_writer/
Dfiemap_writer.h47 static FiemapUniquePtr Open(const std::string& file_path, uint64_t file_size,
Dsplit_fiemap_writer.h43 static std::unique_ptr<SplitFiemap> Create(const std::string& file_path, uint64_t file_size,

12