Searched refs:kSlopBytes (Results 1 – 4 of 4) sorted by relevance
/third_party/protobuf/src/google/protobuf/ |
D | parse_context.cc | 52 constexpr int kSlopBytes = EpsCopyInputStream::kSlopBytes; in ParseEndsInSlopRegion() local 54 GOOGLE_DCHECK(overrun <= kSlopBytes); in ParseEndsInSlopRegion() 56 auto end = begin + kSlopBytes; in ParseEndsInSlopRegion() 105 GOOGLE_DCHECK(size_ > kSlopBytes); in Next() 107 buffer_end_ = next_chunk_ + size_ - kSlopBytes; in Next() 116 std::memmove(buffer_, buffer_end_, kSlopBytes); in Next() 123 if (size_ > kSlopBytes) { in Next() 125 std::memcpy(buffer_ + kSlopBytes, data, kSlopBytes); in Next() 127 buffer_end_ = buffer_ + kSlopBytes; in Next() 131 std::memcpy(buffer_ + kSlopBytes, data, size_); in Next() [all …]
|
D | parse_context.h | 110 enum { kSlopBytes = 16, kMaxCordBytesToCopy = 512 }; enumerator 116 GOOGLE_DCHECK(ptr <= buffer_end_ + kSlopBytes); in BackUp() 119 count = static_cast<int>(buffer_end_ + kSlopBytes - ptr); in BackUp() 128 GOOGLE_DCHECK(limit >= 0 && limit <= INT_MAX - kSlopBytes); in PushLimit() 148 if (size <= buffer_end_ + kSlopBytes - ptr) { in Skip() 155 if (size <= buffer_end_ + kSlopBytes - ptr) { in ReadString() 163 if (size <= buffer_end_ + kSlopBytes - ptr) { in AppendString() 220 if (flat.size() > kSlopBytes) { in InitFrom() 221 limit_ = kSlopBytes; in InitFrom() 222 limit_end_ = buffer_end_ = flat.data() + flat.size() - kSlopBytes; in InitFrom() [all …]
|
/third_party/protobuf/src/google/protobuf/io/ |
D | coded_stream.cc | 675 int delta = (end_ - ptr) + (buffer_end_ ? 0 : kSlopBytes); in ByteCount() 686 GOOGLE_DCHECK(overrun <= kSlopBytes); // NOLINT in Flush() 697 s = end_ + kSlopBytes - ptr; in Flush() 804 if (PROTOBUF_PREDICT_TRUE(size > kSlopBytes)) { in Next() 805 std::memcpy(ptr, end_, kSlopBytes); in Next() 806 end_ = ptr + size - kSlopBytes; in Next() 812 std::memmove(buffer_, end_, kSlopBytes); in Next() 818 std::memcpy(buffer_, end_, kSlopBytes); in Next() 820 end_ = buffer_ + kSlopBytes; in Next() 830 GOOGLE_DCHECK(overrun <= kSlopBytes); // NOLINT in EnsureSpaceFallback() [all …]
|
D | coded_stream.h | 654 enum { kSlopBytes = 16 }; enumerator 828 uint8 buffer_[2 * kSlopBytes]; 838 GOOGLE_DCHECK(ptr <= end_ + kSlopBytes); // NOLINT in GetSize() 839 return end_ + kSlopBytes - ptr; in GetSize() 845 end_ = buffer_ + kSlopBytes; in Error() 947 if (size > kSlopBytes) { in SetInitialBuffer() 948 end_ = ptr + size - kSlopBytes; in SetInitialBuffer()
|