| /leveldb-1.20/helpers/memenv/ |
| H A D | memenv.cc | 53 if (offset > size_) { in Read() 56 const uint64_t available = size_ - offset; in Read() 65 assert(offset / kBlockSize <= SIZE_MAX); in Read() 66 size_t block = static_cast<size_t>(offset / kBlockSize); in Read() 67 size_t block_offset = offset % kBlockSize; in Read() 101 size_t offset = size_ % kBlockSize; in Append() local 103 if (offset != 0) { in Append() 105 avail = kBlockSize - offset; in Append() 115 memcpy(blocks_.back() + offset, src, avail); in Append() 194 virtual Status Read(uint64_t offset, size_t n, Slice* result, in Read() argument [all …]
|
| /leveldb-1.20/doc/ |
| H A D | table_format.md | 20 offset: varint64 65 in a block whose file offset falls within the range 83 [offset of filter 0] : 4 bytes 84 [offset of filter 1] : 4 bytes 85 [offset of filter 2] : 4 bytes 87 [offset of filter N-1] : 4 bytes 89 [offset of beginning of offset array] : 4 bytes 92 The offset array at the end of the filter block allows efficient 93 mapping from a data block offset to the corresponding filter.
|
| /leveldb-1.20/db/ |
| H A D | corruption_test.cc | 126 void Corrupt(FileType filetype, int offset, int bytes_to_corrupt) { in Corrupt() argument 150 if (offset < 0) { in Corrupt() 152 if (-offset > sbuf.st_size) { in Corrupt() 153 offset = 0; in Corrupt() 155 offset = sbuf.st_size + offset; in Corrupt() 158 if (offset > sbuf.st_size) { in Corrupt() 159 offset = sbuf.st_size; in Corrupt() 161 if (offset + bytes_to_corrupt > sbuf.st_size) { in Corrupt() 162 bytes_to_corrupt = sbuf.st_size - offset; in Corrupt() 170 contents[i + offset] ^= 0x80; in Corrupt()
|
| H A D | log_test.cc | 155 void IncrementByte(int offset, int delta) { in IncrementByte() argument 156 dest_.contents_[offset] += delta; in IncrementByte() 159 void SetByte(int offset, char new_byte) { in SetByte() argument 160 dest_.contents_[offset] = new_byte; in SetByte() 517 for (int offset = kBlockSize; offset < 2*kBlockSize; offset++) { in TEST() local 518 SetByte(offset, 'x'); in TEST()
|
| H A D | db_test.cc | 174 virtual Status Read(uint64_t offset, size_t n, Slice* result, in NewRandomAccessFile() argument 177 return target_->Read(offset, n, result, scratch); in NewRandomAccessFile()
|
| /leveldb-1.20/table/ |
| H A D | format.h | 27 uint64_t offset() const { return offset_; } in offset() function 28 void set_offset(uint64_t offset) { offset_ = offset; } in set_offset() argument
|
| H A D | table_builder.cc | 24 uint64_t offset; member 51 offset(0), in Rep() 135 r->filter_block->StartBlock(r->offset); in Flush() 179 handle->set_offset(r->offset); in WriteRawBlock() 190 r->offset += block_contents.size() + kBlockTrailerSize; in WriteRawBlock() 250 r->offset += footer_encoding.size(); in Finish() 267 return rep_->offset; in FileSize()
|
| H A D | table.cc | 183 EncodeFixed64(cache_key_buffer+8, handle.offset()); in BlockReader() 238 !filter->KeyMayMatch(handle.offset(), k)) { in InternalGet() 268 result = handle.offset(); in ApproximateOffsetOf() 273 result = rep_->metaindex_handle.offset(); in ApproximateOffsetOf() 279 result = rep_->metaindex_handle.offset(); in ApproximateOffsetOf()
|
| H A D | block.cc | 110 uint32_t offset = GetRestartPoint(index); in SeekToRestartPoint() local 111 value_ = Slice(data_ + offset, 0); in SeekToRestartPoint()
|
| H A D | table_test.cc | 120 virtual Status Read(uint64_t offset, size_t n, Slice* result, in Read() argument 122 if (offset > contents_.size()) { in Read() 125 if (offset + n > contents_.size()) { in Read() 126 n = contents_.size() - offset; in Read() 128 memcpy(scratch, &contents_[offset], n); in Read()
|
| H A D | format.cc | 78 Status s = file->Read(handle.offset(), n + kBlockTrailerSize, &contents, buf); in ReadBlock()
|
| /leveldb-1.20/util/ |
| H A D | env_posix.cc | 151 virtual Status Read(uint64_t offset, size_t n, Slice* result, in Read() argument 162 ssize_t r = pread(fd, scratch, n, static_cast<off_t>(offset)); in Read() 197 virtual Status Read(uint64_t offset, size_t n, Slice* result, in Read() argument 200 if (offset + n > length_) { in Read() 204 *result = Slice(reinterpret_cast<char*>(mmapped_region_) + offset, n); in Read()
|
| /leveldb-1.20/include/leveldb/ |
| H A D | env.h | 215 virtual Status Read(uint64_t offset, size_t n, Slice* result,
|