Home
last modified time | relevance | path

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

/system/libbase/
Dmapped_file.cpp38 std::unique_ptr<MappedFile> MappedFile::FromFd(borrowed_fd fd, off64_t offset, size_t length, in FromFd()
47 std::unique_ptr<MappedFile> MappedFile::FromOsHandle(os_handle h, off64_t offset, size_t length, in FromOsHandle()
61 return std::unique_ptr<MappedFile>( in FromOsHandle()
62 new MappedFile(const_cast<char*>(kEmptyBuffer), 0, 0, nullptr)); in FromOsHandle()
72 return std::unique_ptr<MappedFile>( in FromOsHandle()
73 new MappedFile(static_cast<char*>(base), length, slop, handle)); in FromOsHandle()
80 return std::unique_ptr<MappedFile>(new MappedFile(const_cast<char*>(kEmptyBuffer), 0, 0)); in FromOsHandle()
84 return std::unique_ptr<MappedFile>(new MappedFile(static_cast<char*>(base), length, slop)); in FromOsHandle()
88 MappedFile::MappedFile(MappedFile&& other) in MappedFile() function in android::base::MappedFile
99 MappedFile& MappedFile::operator=(MappedFile&& other) { in operator =()
[all …]
Dmapped_file_test.cpp34 auto m = android::base::MappedFile::FromFd(tf.fd, 3, 2, PROT_READ); in TEST()
46 auto m = android::base::MappedFile::FromFd(tf.fd, 4096, 0, PROT_READ); in TEST()
Dabi_compatibility.cpp83 extern "C" std::unique_ptr<MappedFile> MAPPEDFILE_FROMFD(int fd, off64_t offset, size_t length, in MAPPEDFILE_FROMFD()
85 return MappedFile::FromFd(fd, offset, length, prot); in MAPPEDFILE_FROMFD()
/system/libbase/include/android-base/
Dmapped_file.h43 class MappedFile {
50 static std::unique_ptr<MappedFile> FromFd(borrowed_fd fd, off64_t offset, size_t length,
56 static std::unique_ptr<MappedFile> FromOsHandle(os_handle h, off64_t offset, size_t length,
62 ~MappedFile();
67 MappedFile(MappedFile&& other);
68 MappedFile& operator=(MappedFile&& other);
74 DISALLOW_IMPLICIT_CONSTRUCTORS(MappedFile);
84 MappedFile(char* base, size_t size, size_t offset, HANDLE handle) in MappedFile() function
88 MappedFile(char* base, size_t size, size_t offset) : base_(base), size_(size), offset_(offset) {} in MappedFile() function
/system/incremental_delivery/incfs/tests/
Dhardening_benchmark.cpp33 static std::pair<std::unique_ptr<TemporaryFile>, std::unique_ptr<android::base::MappedFile>>
37 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in makeEmptyFileMapping()
52 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestSignal()
100 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccess()
110 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccessFast()
122 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccessVal()
132 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccessNested()
144 auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ); in TestAccessDoubleNested()
/system/extras/simpleperf/
Dread_dex_file.cpp84 std::unique_ptr<android::base::MappedFile> map; in ReadSymbolsFromDexFile()
85 map = android::base::MappedFile::FromFd(fd, 0, file_size, PROT_READ); in ReadSymbolsFromDexFile()
/system/libziparchive/
Dzip_archive_private.h53 std::unique_ptr<android::base::MappedFile> mapped_file_;
85 std::unique_ptr<android::base::MappedFile> directory_map;
Dzip_archive.cc1717 android::base::MappedFile::FromFd(fd, fd_offset_, size_t(data_length_), PROT_READ); in MappedZipFile()
1827 directory_map = android::base::MappedFile::FromFd(mapped_zip.GetFileDescriptor(), in InitializeCentralDirectory()
Dzip_archive_test.cc634 android::base::MappedFile::FromFd(fd, 0, static_cast<size_t>(sb.st_size), PROT_READ)}; in TEST()
/system/logging/logd/
DReplayMessages.cpp38 using android::base::MappedFile;
99 static log_time GetFirstTimeStamp(const MappedFile& recorded_messages) { in GetFirstTimeStamp()
408 auto recorded_messages = MappedFile::FromFd(recorded_messages_fd, 0, in main()
/system/update_engine/common/
Dutils.cc1240 std::unique_ptr<android::base::MappedFile> GetReadonlyZeroBlock(size_t size) { in GetReadonlyZeroBlock()
1242 return android::base::MappedFile::FromFd(fd, 0, size, PROT_READ); in GetReadonlyZeroBlock()
Dutils.h421 std::unique_ptr<android::base::MappedFile> GetReadonlyZeroBlock(size_t size);
/system/core/libsparse/
Doutput_file.cpp330 auto m = android::base::MappedFile::FromFd(fd, current_offset, mmap_size, PROT_READ); in write_fd_chunk_range()
/system/core/fastboot/
Dfastboot_driver.cpp541 auto mapping{android::base::MappedFile::FromFd(fd, offset, len, PROT_READ)}; in SendBuffer()