aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/mapped_file/mapped_file.h
diff options
context:
space:
mode:
authormelkov <melkov@yandex-team.ru>2022-02-10 16:48:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:14 +0300
commit2c532b38e6aeb4fd88531027c7335690fd34c4e5 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/deprecated/mapped_file/mapped_file.h
parent438546c8737d5c1fdeb31157dcf999717d930eec (diff)
downloadydb-2c532b38e6aeb4fd88531027c7335690fd34c4e5.tar.gz
Restoring authorship annotation for <melkov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/deprecated/mapped_file/mapped_file.h')
-rw-r--r--library/cpp/deprecated/mapped_file/mapped_file.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/deprecated/mapped_file/mapped_file.h b/library/cpp/deprecated/mapped_file/mapped_file.h
index 32bd169c57..45859ed65a 100644
--- a/library/cpp/deprecated/mapped_file/mapped_file.h
+++ b/library/cpp/deprecated/mapped_file/mapped_file.h
@@ -25,11 +25,11 @@ public:
TMappedFile() {
Map_ = nullptr;
}
-
+
~TMappedFile() {
term();
}
-
+
explicit TMappedFile(const TString& name) {
Map_ = nullptr;
init(name, TFileMap::oRdOnly);
@@ -54,16 +54,16 @@ public:
Map_ = nullptr;
}
}
-
+
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;
void swap(TMappedFile& file) noexcept {