Home
last modified time | relevance | path

Searched refs:st_size (Results 1 – 25 of 67) sorted by relevance

123

/system/bt/osi/test/
Dwakelock_test.cc101 CHECK(lock_stat.st_size >= unlock_stat.st_size); in IsFileWakeLockAcquired()
104 mmap(nullptr, lock_stat.st_size, PROT_READ, MAP_PRIVATE, lock_fd, 0); in IsFileWakeLockAcquired()
106 void* unlock_file = mmap(nullptr, unlock_stat.st_size, PROT_READ, in IsFileWakeLockAcquired()
109 if (memcmp(lock_file, unlock_file, unlock_stat.st_size) == 0) { in IsFileWakeLockAcquired()
110 acquired = lock_stat.st_size > unlock_stat.st_size; in IsFileWakeLockAcquired()
117 munmap(lock_file, lock_stat.st_size); in IsFileWakeLockAcquired()
118 munmap(unlock_file, unlock_stat.st_size); in IsFileWakeLockAcquired()
/system/extras/pagecache/
Ddumpcache.c84 void* mapped_addr = mmap(NULL, sb->st_size, PROT_NONE, MAP_SHARED, fd, 0); in store_num_cached()
88 size_t num_file_pages = (sb->st_size + g_page_size - 1) / g_page_size; in store_num_cached()
90 ret = mincore(mapped_addr, sb->st_size, mincore_data); in store_num_cached()
98 struct file_info *info = get_file_info(fpath, sb->st_size); in store_num_cached()
103 munmap(mapped_addr, sb->st_size); in store_num_cached()
/system/sepolicy/tools/sepolicy-analyze/
Dutils.c41 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy()
50 pf->len = sb.st_size; in load_policy()
64 munmap(map, sb.st_size); in load_policy()
/system/core/mkbootfs/
Dmkbootfs.c251 tmp = (char*) malloc(s.st_size); in _archive()
252 if(tmp == 0) die("cannot allocate %d bytes", s.st_size); in _archive()
254 if(read(fd, tmp, s.st_size) != s.st_size) { in _archive()
255 die("cannot read %d bytes", s.st_size); in _archive()
258 _eject(&s, out, olen, tmp, s.st_size); in _archive()
/system/iorap/src/serialize/
Dprotobuf_io.cc64 buf.st_size, in Open()
79 google::protobuf::io::ArrayInputStream protobuf_input_stream{data, static_cast<int>(buf.st_size)}; in Open()
86 if (munmap(data, buf.st_size) < 0) { in Open()
/system/nvram/hal/
Dfake_nvram_storage.cpp95 if (data_file_stat.st_size > kMaxFileSize) { in LoadFile()
96 LOG(ERROR) << "Bad size for " << name << ":" << data_file_stat.st_size; in LoadFile()
100 if (!blob->Resize(data_file_stat.st_size)) { in LoadFile()
/system/sepolicy/tools/
Dsepolicy-check.c204 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy()
214 pf->len = sb.st_size; in load_policy()
218 munmap(map, sb.st_size); in load_policy()
225 munmap(map, sb.st_size); in load_policy()
Dversion_policy.c48 file_size = filedata.st_size; in read_cil_file()
/system/unwinding/libunwindstack/
DSymbols.cpp75 Info& info = symbols_[sym.st_value + sym.st_size]; in BinarySearch()
76 info = {.size = static_cast<uint32_t>(sym.st_size), .index = current}; in BinarySearch()
79 } else if (addr < sym.st_value + sym.st_size) { in BinarySearch()
111 if (IsFunc(&sym) && sym.st_size != 0) { in BuildRemapTable()
/system/core/fs_mgr/libsnapshot/
Dpower_test.cpp191 while (written < s.st_size) { in Create()
192 uint64_t remaining = s.st_size - written; in Create()
268 uint64_t s1_size = (s1.st_size + 4095) & ~uint64_t(4095); in SetupImages()
269 uint64_t s2_size = (s2.st_size + 4095) & ~uint64_t(4095); in SetupImages()
292 while (written < s1.st_size) { in SetupImages()
293 uint64_t remaining = s1.st_size - written; in SetupImages()
496 uint64_t canonical_size = s.st_size; in Check()
Destimate_cow_from_nonab_ota.cpp293 source_size = s.st_size; in AnalyzePartition()
388 size_ += s.st_size; in AnalyzePartition()
/system/core/fs_mgr/libvbmeta/
Dutility.cpp37 return sb.st_size; in GetFileSize()
/system/core/libcutils/
Dashmem-host.cpp95 return buf.st_size; in ashmem_get_size_region()
Dashmem-dev.cpp469 ALOGD("ashmem_get_size_region(%d): %d\n", fd, static_cast<int>(sb.st_size)); in ashmem_get_size_region()
472 return sb.st_size; in ashmem_get_size_region()
/system/extras/ioshark/
Ddump_ioshark_filenames.c50 filename_cache_num_entries = st.st_size / in main()
/system/unwinding/libunwindstack/tests/
DSymbolsTest.cpp47 void InitSym(TypeParam* sym, uint32_t st_value, uint32_t st_size, uint32_t st_name) { in InitSym() argument
51 sym->st_size = st_size; in InitSym()
359 sym.st_size = 0x100; in TYPED_TEST_P()
377 sym.st_size = 0x100; in TYPED_TEST_P()
/system/core/trusty/apploader/
Dapploader.cpp109 assert(st.st_size >= 0); in read_file()
110 file_size = st.st_size; in read_file()
/system/core/property_service/libpropertyinfoparser/
Dproperty_info_parser.cpp210 (fd_stat.st_size < static_cast<off_t>(sizeof(PropertyInfoArea)))) { in LoadPath()
215 auto mmap_size = fd_stat.st_size; in LoadPath()
/system/core/libprocessgroup/cgrouprc/
Dcgroup_file.cpp50 size_t file_size = sb.st_size; in LoadRcFile()
/system/extras/kexec_tools/
Dkexecload.c32 return st.st_size; in get_file_size()
/system/security/identity/
DUtil.cpp64 data.resize(statbuf.st_size); in fileGetContents()
/system/extras/verity/fec/tests/
Dfec.py34 size = os.stat(image).st_size
/system/sepolicy/tests/
Dsepol_wrap.cpp221 auto unmap = [=](void *ptr) { munmap(ptr, sb.st_size); }; in load_policy()
223 mmap(nullptr, sb.st_size, PROT_READ, MAP_PRIVATE, fileno(fp), 0), unmap); in load_policy()
235 pf.len = sb.st_size; in load_policy()
/system/core/libutils/
DTokenizer.cpp62 size_t length = size_t(stat.st_size); in open()
/system/core/libdiskconfig/
Ddiskconfig.c329 dinfo->num_lba = (uint32_t)(stat.st_size / dinfo->sect_size); in validate()
330 disk_size = (uint64_t)stat.st_size; in validate()

123