aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/mapped_file/mapped_file.h
diff options
context:
space:
mode:
authordenplusplus <denplusplus@yandex-team.ru>2022-02-10 16:47:34 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:34 +0300
commit57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a (patch)
treecc63639f8e502db19a82c20e2861c6d1edbf9fea /library/cpp/deprecated/mapped_file/mapped_file.h
parent464ba3814a83db4f2d5327393b0b6eaf0c86bfd7 (diff)
downloadydb-57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a.tar.gz
Restoring authorship annotation for <denplusplus@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/deprecated/mapped_file/mapped_file.h')
-rw-r--r--library/cpp/deprecated/mapped_file/mapped_file.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/deprecated/mapped_file/mapped_file.h b/library/cpp/deprecated/mapped_file/mapped_file.h
index 45859ed65a..9edd84672a 100644
--- a/library/cpp/deprecated/mapped_file/mapped_file.h
+++ b/library/cpp/deprecated/mapped_file/mapped_file.h
@@ -17,7 +17,7 @@
class TMappedFile {
private:
TFileMap* Map_;
-
+
private:
TMappedFile(TFileMap* map, const char* dbgName);
@@ -34,19 +34,19 @@ public:
Map_ = nullptr;
init(name, TFileMap::oRdOnly);
}
-
+
TMappedFile(const TFile& file, TFileMap::EOpenMode om = TFileMap::oRdOnly, const char* dbgName = "unknown");
void init(const TString& name);
-
+
void init(const TString& name, TFileMap::EOpenMode om);
void init(const TString& name, size_t length, TFileMap::EOpenMode om);
-
+
void init(const TFile&, TFileMap::EOpenMode om = TFileMap::oRdOnly, const char* dbgName = "unknown");
- void flush();
-
+ void flush();
+
void term() {
if (Map_) {
Map_->Unmap();
@@ -57,12 +57,12 @@ public:
size_t getSize() const {
return (Map_ ? Map_->MappedSize() : 0);
- }
+ }
void* getData(size_t pos = 0) const {
Y_ASSERT(!Map_ || (pos <= getSize()));
return (Map_ ? (void*)((unsigned char*)Map_->Ptr() + pos) : nullptr);
- }
+ }
void precharge(size_t pos = 0, size_t size = (size_t)-1) const;