作者: 谢瑞阳 10225101483 徐翔宇 10225101535
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

28 Zeilen
896 B

  1. // Copyright 2017 The LevelDB Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file. See the AUTHORS file for names of contributors.
  4. #ifndef STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_
  5. #define STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_
  6. namespace leveldb {
  7. class EnvPosixTest;
  8. // A helper for the POSIX Env to facilitate testing.
  9. class EnvPosixTestHelper {
  10. private:
  11. friend class EnvPosixTest;
  12. // Set the maximum number of read-only files that will be opened.
  13. // Must be called before creating an Env.
  14. static void SetReadOnlyFDLimit(int limit);
  15. // Set the maximum number of read-only files that will be mapped via mmap.
  16. // Must be called before creating an Env.
  17. static void SetReadOnlyMMapLimit(int limit);
  18. };
  19. } // namespace leveldb
  20. #endif // STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_