Home
last modified time | relevance | path

Searched refs:MemoryMappedFile (Results 1 – 25 of 59) sorted by relevance

123

/external/icing/icing/file/
Dmemory-mapped-file.h55 class MemoryMappedFile {
80 MemoryMappedFile(const Filesystem& filesystem, std::string_view file_path,
82 MemoryMappedFile(const MemoryMappedFile& other) = delete;
83 MemoryMappedFile(MemoryMappedFile&& other);
84 MemoryMappedFile& operator=(const MemoryMappedFile& other) = delete;
85 MemoryMappedFile& operator=(MemoryMappedFile&& other);
87 ~MemoryMappedFile();
141 void Swap(MemoryMappedFile* other);
Dmemory-mapped-file.cc33 MemoryMappedFile::MemoryMappedFile(const Filesystem& filesystem, in MemoryMappedFile() function in icing::lib::MemoryMappedFile
40 MemoryMappedFile::MemoryMappedFile(MemoryMappedFile&& other) in MemoryMappedFile() function in icing::lib::MemoryMappedFile
49 MemoryMappedFile& MemoryMappedFile::operator=(MemoryMappedFile&& other) { in operator =()
57 MemoryMappedFile::~MemoryMappedFile() { Unmap(); } in ~MemoryMappedFile()
59 void MemoryMappedFile::MemoryMappedFile::Unmap() { in Unmap()
71 libtextclassifier3::Status MemoryMappedFile::Remap(size_t file_offset, in Remap()
137 libtextclassifier3::Status MemoryMappedFile::PersistToDisk() { in PersistToDisk()
167 libtextclassifier3::Status MemoryMappedFile::OptimizeFor( in OptimizeFor()
187 void MemoryMappedFile::Swap(MemoryMappedFile* other) { in Swap()
Dfile-backed-vector_test.cc88 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
96 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
106 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
135 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC), in TEST_F()
145 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
157 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
173 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
200 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
239 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
280 MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC)); in TEST_F()
[all …]
Dfile-backed-vector.h161 MemoryMappedFile::Strategy mmap_strategy);
281 std::unique_ptr<MemoryMappedFile> mmapped_file);
286 ScopedFd fd, MemoryMappedFile::Strategy mmap_strategy);
292 MemoryMappedFile::Strategy mmap_strategy);
304 std::unique_ptr<MemoryMappedFile> mmapped_file_;
336 MemoryMappedFile::Strategy mmap_strategy) { in Create()
337 if (mmap_strategy == MemoryMappedFile::Strategy::READ_WRITE_MANUAL_SYNC) { in Create()
374 MemoryMappedFile::Strategy mmap_strategy) { in InitializeNewFile()
395 std::make_unique<MemoryMappedFile>(filesystem, file_path, mmap_strategy); in InitializeNewFile()
405 const ScopedFd fd, MemoryMappedFile::Strategy mmap_strategy) { in InitializeExistingFile()
[all …]
Dfile-backed-bitmap.h83 MemoryMappedFile::Strategy mmap_strategy);
179 MemoryMappedFile::Strategy mmap_strategy);
213 std::unique_ptr<MemoryMappedFile> mmapper_;
Dmemory-mapped-file-leak_test.cc43 MemoryMappedFile mmfile(filesystem, mmfile_dir + "/mmfile", in TEST()
44 MemoryMappedFile::READ_WRITE_AUTO_SYNC); in TEST()
/external/icu/android_icu4j/testing/src/com/android/i18n/test/timezone/internal/
DMemoryMappedFileTest.java23 import com.android.i18n.timezone.internal.MemoryMappedFile;
46 MemoryMappedFile.mmapRO("doesNotExist"); in testMmapRo_missingFile()
57 MemoryMappedFile.mmapRO(file.getPath()); in testMmapRo_emptyFile()
69 try (MemoryMappedFile memoryMappedFile = MemoryMappedFile.mmapRO(file.getPath())) { in testMmapRo()
79 MemoryMappedFile memoryMappedFile = MemoryMappedFile.mmapRO(file.getPath()); in testMmapRo_close()
101 MemoryMappedFile memoryMappedFile = MemoryMappedFile.mmapRO(file.getPath()); in testReadAfterCloseFails()
112 checkReadByte(MemoryMappedFile::bigEndianIterator); in testReadByte()
113 checkReadByte(MemoryMappedFile::littleEndianIterator); in testReadByte()
117 Function<MemoryMappedFile, BufferIterator> iteratorFactory) throws Exception { in checkReadByte() argument
122 MemoryMappedFile mappedFile = MemoryMappedFile.mmapRO(file.getPath()); in checkReadByte()
[all …]
/external/libchrome/base/files/
Dmemory_mapped_file.cc17 const MemoryMappedFile::Region MemoryMappedFile::Region::kWholeFile = {0, 0};
19 bool MemoryMappedFile::Region::operator==( in operator ==()
20 const MemoryMappedFile::Region& other) const { in operator ==()
24 bool MemoryMappedFile::Region::operator!=( in operator !=()
25 const MemoryMappedFile::Region& other) const { in operator !=()
29 MemoryMappedFile::~MemoryMappedFile() { in ~MemoryMappedFile()
34 bool MemoryMappedFile::Initialize(const FilePath& file_name, Access access) { in Initialize()
65 bool MemoryMappedFile::Initialize(File file, Access access) { in Initialize()
70 bool MemoryMappedFile::Initialize(File file, in Initialize()
111 bool MemoryMappedFile::IsValid() const { in IsValid()
[all …]
Dmemory_mapped_file_unittest.cc65 MemoryMappedFile map; in TEST_F()
76 MemoryMappedFile map; in TEST_F()
87 MemoryMappedFile map; in TEST_F()
98 MemoryMappedFile map; in TEST_F()
101 map.Initialize(std::move(file), MemoryMappedFile::Region::kWholeFile); in TEST_F()
112 MemoryMappedFile map; in TEST_F()
115 MemoryMappedFile::Region region = {0, kPartialSize}; in TEST_F()
128 MemoryMappedFile map; in TEST_F()
131 MemoryMappedFile::Region region = {kOffset, kPartialSize}; in TEST_F()
145 MemoryMappedFile map; in TEST_F()
[all …]
Dmemory_mapped_file_posix.cc25 MemoryMappedFile::MemoryMappedFile() : data_(nullptr), length_(0) {} in MemoryMappedFile() function in base::MemoryMappedFile
28 bool MemoryMappedFile::MapFileRegionToMemory( in MapFileRegionToMemory()
29 const MemoryMappedFile::Region& region, in MapFileRegionToMemory()
37 if (region == MemoryMappedFile::Region::kWholeFile) { in MapFileRegionToMemory()
174 void MemoryMappedFile::CloseHandles() { in CloseHandles()
Dmemory_mapped_file.h24 class BASE_EXPORT MemoryMappedFile {
50 MemoryMappedFile();
51 ~MemoryMappedFile();
131 DISALLOW_COPY_AND_ASSIGN(MemoryMappedFile);
/external/google-breakpad/src/common/linux/
Dmemory_mapped_file.cc47 MemoryMappedFile::MemoryMappedFile() {} in MemoryMappedFile() function in google_breakpad::MemoryMappedFile
49 MemoryMappedFile::MemoryMappedFile(const char* path, size_t offset) { in MemoryMappedFile() function in google_breakpad::MemoryMappedFile
53 MemoryMappedFile::~MemoryMappedFile() { in ~MemoryMappedFile()
59 bool MemoryMappedFile::Map(const char* path, size_t offset) { in Map()
100 void MemoryMappedFile::Unmap() { in Map()
Dmemory_mapped_file_unittest.cc46 using google_breakpad::MemoryMappedFile;
53 void ExpectNoMappedData(const MemoryMappedFile& mapped_file) { in ExpectNoMappedData()
63 MemoryMappedFile mapped_file; in TEST_F()
68 MemoryMappedFile mapped_file; in TEST_F()
74 MemoryMappedFile mapped_file("nonexistent-file", 0); in TEST_F()
78 MemoryMappedFile mapped_file; in TEST_F()
90 MemoryMappedFile mapped_file(test_file.c_str(), 0); in TEST_F()
94 MemoryMappedFile mapped_file; in TEST_F()
112 MemoryMappedFile mapped_file(test_file.c_str(), 0); in TEST_F()
119 MemoryMappedFile mapped_file; in TEST_F()
[all …]
Dmemory_mapped_file.h45 class MemoryMappedFile {
47 MemoryMappedFile();
51 MemoryMappedFile(const char* path, size_t offset);
53 ~MemoryMappedFile();
82 DISALLOW_COPY_AND_ASSIGN(MemoryMappedFile);
/external/libchrome/base/posix/
Dglobal_descriptors.cc15 : key(key), fd(fd), region(base::MemoryMappedFile::Region::kWholeFile) { in Descriptor()
20 base::MemoryMappedFile::Region region) in Descriptor()
52 base::MemoryMappedFile::Region* region) { in TakeFD()
67 Set(key, fd, base::MemoryMappedFile::Region::kWholeFile); in Set()
72 base::MemoryMappedFile::Region region) { in Set()
84 base::MemoryMappedFile::Region GlobalDescriptors::GetRegion(Key key) const { in GetRegion()
90 return base::MemoryMappedFile::Region::kWholeFile; in GetRegion()
Dglobal_descriptors.h47 Descriptor(Key key, int fd, base::MemoryMappedFile::Region region);
54 base::MemoryMappedFile::Region region;
74 base::ScopedFD TakeFD(Key key, base::MemoryMappedFile::Region* region);
77 base::MemoryMappedFile::Region GetRegion(Key key) const;
84 void Set(Key key, int fd, base::MemoryMappedFile::Region region);
/external/libchrome/base/
Dfile_descriptor_store.h26 base::MemoryMappedFile::Region region);
37 base::MemoryMappedFile::Region region;
47 base::MemoryMappedFile::Region* region);
51 base::MemoryMappedFile::Region* region);
60 base::MemoryMappedFile::Region region);
Dfile_descriptor_store.cc17 region(base::MemoryMappedFile::Region::kWholeFile) {} in Descriptor()
22 base::MemoryMappedFile::Region region) in Descriptor()
39 base::MemoryMappedFile::Region* region) { in TakeFD()
48 base::MemoryMappedFile::Region* region) { in MaybeTakeFD()
59 Set(key, std::move(fd), base::MemoryMappedFile::Region::kWholeFile); in Set()
64 base::MemoryMappedFile::Region region) { in Set()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowMemoryMappedFile.java12 import libcore.io.MemoryMappedFile;
23 @Implements(value = MemoryMappedFile.class, isInAndroidSdk = false)
31 public static MemoryMappedFile mmapRO(String path) throws Throwable { in mmapRO()
33 InputStream is = MemoryMappedFile.class.getResourceAsStream(TZ_DATA_2); in mmapRO()
39 MemoryMappedFile memoryMappedFile = new MemoryMappedFile(0L, 0L); in mmapRO()
57 … return MemoryMappedFile.class.getClassLoader().loadClass("libcore.io.ErrnoException"); in exceptionClass()
/external/libchrome/base/i18n/
Dicu_util.cc87 MemoryMappedFile* g_icudtl_mapped_file = nullptr;
88 MemoryMappedFile::Region g_icudtl_region;
150 g_icudtl_region = MemoryMappedFile::Region::kWholeFile; in LazyInitIcuDataFile()
164 const MemoryMappedFile::Region& data_region) { in InitializeICUWithFileDescriptorInternal()
176 std::unique_ptr<MemoryMappedFile> icudtl_mapped_file(new MemoryMappedFile()); in InitializeICUWithFileDescriptorInternal()
217 const MemoryMappedFile::Region& data_region) { in InitializeICUWithFileDescriptor()
225 PlatformFile GetIcuDataFileHandle(MemoryMappedFile::Region* out_region) { in GetIcuDataFileHandle()
Dicu_util.h31 MemoryMappedFile::Region* out_region);
37 const MemoryMappedFile::Region& data_region);
/external/icu/android_icu4j/libcore_bridge/src/java/com/android/i18n/timezone/internal/
DMemoryMappedFile.java31 public final class MemoryMappedFile implements AutoCloseable { class
37 public MemoryMappedFile(long address, long size) { in MemoryMappedFile() method in MemoryMappedFile
49 public static MemoryMappedFile mmapRO(String path) throws ErrnoException { in mmapRO()
54 return new MemoryMappedFile(address, size); in mmapRO()
/external/icing/icing/index/main/
Dindex-block.cc70 MemoryMappedFile mmapped_file( in CreateFromPreexistingIndexBlockRegion()
71 filesystem, file_path, MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC); in CreateFromPreexistingIndexBlockRegion()
91 MemoryMappedFile mmapped_file( in CreateFromUninitializedRegion()
92 filesystem, file_path, MemoryMappedFile::Strategy::READ_WRITE_AUTO_SYNC); in CreateFromUninitializedRegion()
103 IndexBlock::IndexBlock(MemoryMappedFile mmapped_block) in IndexBlock()
109 std::make_unique<MemoryMappedFile>(std::move(mmapped_block))) {} in IndexBlock()
/external/libchrome/base/android/
Dapk_assets.cc19 base::MemoryMappedFile::Region* region) { in OpenApkAsset()
36 base::MemoryMappedFile::Region region = in RegisterApkAssetWithFileDescriptorStore()
37 base::MemoryMappedFile::Region::kWholeFile; in RegisterApkAssetWithFileDescriptorStore()
/external/libchrome/base/metrics/
Dpersistent_memory_allocator_unittest.cc749 std::unique_ptr<MemoryMappedFile> mmfile(new MemoryMappedFile()); in TEST()
788 MemoryMappedFile::Region region = {0, 16 << 10}; // 16KiB maximum size. in TEST()
807 std::unique_ptr<MemoryMappedFile> mmfile(new MemoryMappedFile()); in TEST()
810 region, MemoryMappedFile::READ_WRITE_EXTEND); in TEST()
826 std::unique_ptr<MemoryMappedFile> mmfile(new MemoryMappedFile()); in TEST()
829 region, MemoryMappedFile::READ_WRITE_EXTEND); in TEST()
849 std::unique_ptr<MemoryMappedFile> mmfile; in TEST()
868 const MemoryMappedFile::Access map_access = in TEST()
869 read_only ? MemoryMappedFile::READ_ONLY : MemoryMappedFile::READ_WRITE; in TEST()
871 mmfile.reset(new MemoryMappedFile()); in TEST()
[all …]

123