From 9907b61c574baf0747747f1c512f7cdd88ebed25 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Tue, 9 Nov 2021 22:00:01 +0800 Subject: init --- util/env_windows_test_helper.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 util/env_windows_test_helper.h (limited to 'util/env_windows_test_helper.h') diff --git a/util/env_windows_test_helper.h b/util/env_windows_test_helper.h new file mode 100644 index 0000000..e6f6020 --- /dev/null +++ b/util/env_windows_test_helper.h @@ -0,0 +1,25 @@ +// Copyright 2018 (c) The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_ +#define STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_ + +namespace leveldb { + +class EnvWindowsTest; + +// A helper for the Windows Env to facilitate testing. +class EnvWindowsTestHelper { + private: + friend class CorruptionTest; + friend class EnvWindowsTest; + + // Set the maximum number of read-only files that will be mapped via mmap. + // Must be called before creating an Env. + static void SetReadOnlyMMapLimit(int limit); +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_ENV_WINDOWS_TEST_HELPER_H_ -- cgit v1.3.1