Changeset View
Changeset View
Standalone View
Standalone View
src/leveldb/util/env_posix.cc
Show First 20 Lines • Show All 571 Lines • ▼ Show 20 Lines | private: | ||||
Limiter fd_limit_; | Limiter fd_limit_; | ||||
}; | }; | ||||
// Return the maximum number of concurrent mmaps. | // Return the maximum number of concurrent mmaps. | ||||
static int MaxMmaps() { | static int MaxMmaps() { | ||||
if (mmap_limit >= 0) { | if (mmap_limit >= 0) { | ||||
return mmap_limit; | return mmap_limit; | ||||
} | } | ||||
// Up to 1000 mmaps for 64-bit binaries; none for smaller pointer sizes. | // Up to 4096 mmaps for 64-bit binaries; none for smaller pointer sizes. | ||||
mmap_limit = sizeof(void*) >= 8 ? 1000 : 0; | mmap_limit = sizeof(void*) >= 8 ? 4096 : 0; | ||||
return mmap_limit; | return mmap_limit; | ||||
} | } | ||||
// Return the maximum number of read-only files to keep open. | // Return the maximum number of read-only files to keep open. | ||||
static intptr_t MaxOpenFiles() { | static intptr_t MaxOpenFiles() { | ||||
if (open_read_only_file_limit >= 0) { | if (open_read_only_file_limit >= 0) { | ||||
return open_read_only_file_limit; | return open_read_only_file_limit; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |