Kaynağa Gözat

fixed random access file exhaust random mmap file use wrong limit count

ld
wineway 3 yıl önce
ebeveyn
işleme
8949158f5d
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. +3
    -3
      util/env_posix_test.cc

+ 3
- 3
util/env_posix_test.cc Dosyayı Görüntüle

@ -243,8 +243,8 @@ TEST_F(EnvPosixTest, TestCloseOnExecRandomAccessFile) {
// Exhaust the RandomAccessFile mmap limit. This way, the test
// RandomAccessFile instance below is backed by a file descriptor, not by an
// mmap region.
leveldb::RandomAccessFile* mmapped_files[kReadOnlyFileLimit] = {nullptr};
for (int i = 0; i < kReadOnlyFileLimit; i++) {
leveldb::RandomAccessFile* mmapped_files[kMMapLimit];
for (int i = 0; i < kMMapLimit; i++) {
ASSERT_LEVELDB_OK(env_->NewRandomAccessFile(file_path, &mmapped_files[i]));
}
@ -253,7 +253,7 @@ TEST_F(EnvPosixTest, TestCloseOnExecRandomAccessFile) {
CheckCloseOnExecDoesNotLeakFDs(open_fds);
delete file;
for (int i = 0; i < kReadOnlyFileLimit; i++) {
for (int i = 0; i < kMMapLimit; i++) {
delete mmapped_files[i];
}
ASSERT_LEVELDB_OK(env_->RemoveFile(file_path));

Yükleniyor…
İptal
Kaydet