diff options
author | melkov <melkov@yandex-team.ru> | 2022-02-10 16:48:13 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:13 +0300 |
commit | 438546c8737d5c1fdeb31157dcf999717d930eec (patch) | |
tree | d29d229abd2f9f889b9b7eb148d635059dc26acf /util/system/filemap.cpp | |
parent | 96647fad5355ff5ef45a00a6d85c097028584ab0 (diff) | |
download | ydb-438546c8737d5c1fdeb31157dcf999717d930eec.tar.gz |
Restoring authorship annotation for <melkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/filemap.cpp')
-rw-r--r-- | util/system/filemap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/system/filemap.cpp b/util/system/filemap.cpp index 7454a4cb94..a0864cc980 100644 --- a/util/system/filemap.cpp +++ b/util/system/filemap.cpp @@ -60,7 +60,7 @@ namespace { return sysInfo.dwAllocationGranularity; #else return NSystemInfo::GetPageSize(); -#endif +#endif } const size_t GRANULARITY_; @@ -188,7 +188,7 @@ public: , Mode_(om) { CheckFile(); - + if (File_.GetLength() < Length_) { File_.Resize(Length_); } @@ -220,15 +220,15 @@ public: inline TMapResult Map(i64 offset, size_t size) { assert(File_.IsOpen()); - + if (offset > Length_) { ythrow yexception() << "Can't map something at offset " << offset << " of '" << DbgName_ << "' with length " << Length_; } - + if (offset + (i64)size > Length_) { ythrow yexception() << "Can't map " << (unsigned long)size << " bytes at offset " << offset << " of '" << DbgName_ << "' with length " << Length_; } - + TMapResult result; i64 base = DownToGranularity(offset); |