Home
last modified time | relevance | path

Searched refs:scratch (Results 1 – 17 of 17) sorted by relevance

/leveldb-1.20/db/
H A Dlog_reader.cc60 bool Reader::ReadRecord(Slice* record, std::string* scratch) { in ReadRecord() argument
67 scratch->clear(); in ReadRecord()
102 if (scratch->empty()) { in ReadRecord()
109 scratch->clear(); in ReadRecord()
120 if (scratch->empty()) { in ReadRecord()
127 scratch->assign(fragment.data(), fragment.size()); in ReadRecord()
136 scratch->append(fragment.data(), fragment.size()); in ReadRecord()
146 *record = Slice(*scratch); in ReadRecord()
157 scratch->clear(); in ReadRecord()
165 scratch->clear(); in ReadRecord()
[all …]
H A Dmemtable.cc44 static const char* EncodeKey(std::string* scratch, const Slice& target) { in EncodeKey() argument
45 scratch->clear(); in EncodeKey()
46 PutVarint32(scratch, target.size()); in EncodeKey()
47 scratch->append(target.data(), target.size()); in EncodeKey()
48 return scratch->data(); in EncodeKey()
H A Dlog_test.cc61 virtual Status Read(size_t n, Slice* result, char* scratch) { in Read() argument
146 std::string scratch; in Read() local
148 if (reader_->ReadRecord(&record, &scratch)) { in Read()
215 std::string scratch; in CheckOffsetPastEndReturnsNoRecords() local
216 ASSERT_TRUE(!offset_reader->ReadRecord(&record, &scratch)); in CheckOffsetPastEndReturnsNoRecords()
233 std::string scratch; in CheckInitialOffsetRecord() local
234 ASSERT_TRUE(offset_reader->ReadRecord(&record, &scratch)); in CheckInitialOffsetRecord()
H A Dlog_reader.h53 bool ReadRecord(Slice* record, std::string* scratch);
H A Ddumpfile.cc62 std::string scratch; in PrintLogContents() local
63 while (reader.ReadRecord(&record, &scratch)) { in PrintLogContents()
H A Dfault_injection_test.cc60 char* scratch = new char[length]; in Truncate() local
62 s = orig_file->Read(length, &result, scratch); in Truncate()
79 delete[] scratch; in Truncate()
H A Drepair.cc197 std::string scratch; in ConvertLogToTable() local
203 while (reader.ReadRecord(&record, &scratch)) { in ConvertLogToTable()
H A Dversion_set.cc946 std::string scratch; in Recover() local
947 while (reader.ReadRecord(&record, &scratch) && s.ok()) { in Recover()
1138 const char* VersionSet::LevelSummary(LevelSummaryStorage* scratch) const { in LevelSummary()
1141 snprintf(scratch->buffer, sizeof(scratch->buffer), in LevelSummary()
1150 return scratch->buffer; in LevelSummary()
H A Dversion_set.h269 const char* LevelSummary(LevelSummaryStorage* scratch) const;
H A Ddb_impl.cc408 std::string scratch; in RecoverLogFile() local
413 while (reader.ReadRecord(&record, &scratch) && in RecoverLogFile()
H A Ddb_test.cc175 char* scratch) const { in NewRandomAccessFile()
177 return target_->Read(offset, n, result, scratch); in NewRandomAccessFile()
/leveldb-1.20/helpers/memenv/
H A Dmemenv_test.cc101 char scratch[100]; in TEST() local
112 ASSERT_OK(seq_file->Read(5, &result, scratch)); // Read "hello". in TEST()
115 ASSERT_OK(seq_file->Read(1000, &result, scratch)); // Read "world". in TEST()
120 ASSERT_OK(seq_file->Read(1000, &result, scratch)); in TEST()
126 ASSERT_OK(rand_file->Read(6, 5, &result, scratch)); // Read "world". in TEST()
130 ASSERT_OK(rand_file->Read(10, 100, &result, scratch)); // Read "d". in TEST()
134 ASSERT_TRUE(!rand_file->Read(1000, 5, &result, scratch).ok()); in TEST()
163 char* scratch = new char[kWriteSize * 2]; in TEST() local
179 ASSERT_OK(seq_file->Read(3, &result, scratch)); // Read "foo". in TEST()
185 ASSERT_OK(seq_file->Read(kWriteSize - read, &result, scratch)); in TEST()
[all …]
H A Dmemenv.cc52 Status Read(uint64_t offset, size_t n, Slice* result, char* scratch) const { in Read()
76 char* dst = scratch; in Read()
91 *result = Slice(scratch, n); in Read()
159 virtual Status Read(size_t n, Slice* result, char* scratch) { in Read() argument
160 Status s = file_->Read(pos_, n, result, scratch); in Read()
195 char* scratch) const { in Read()
196 return file_->Read(offset, n, result, scratch); in Read()
/leveldb-1.20/util/
H A Denv_posix_test.cc47 char scratch; in TEST() local
50 ASSERT_OK(files[i]->Read(i, 1, &read_result, &scratch)); in TEST()
H A Denv_posix.cc102 virtual Status Read(size_t n, Slice* result, char* scratch) { in Read() argument
104 size_t r = fread_unlocked(scratch, 1, n, file_); in Read()
105 *result = Slice(scratch, r); in Read()
152 char* scratch) const { in Read()
162 ssize_t r = pread(fd, scratch, n, static_cast<off_t>(offset)); in Read()
163 *result = Slice(scratch, (r < 0) ? 0 : r); in Read()
198 char* scratch) const { in Read()
/leveldb-1.20/include/leveldb/
H A Denv.h183 virtual Status Read(size_t n, Slice* result, char* scratch) = 0;
216 char* scratch) const = 0;
/leveldb-1.20/table/
H A Dtable_test.cc121 char* scratch) const { in Read()
128 memcpy(scratch, &contents_[offset], n); in Read()
129 *result = Slice(scratch, n); in Read()