12 #include <glog/logging.h> 41 if (trackReferences) {
51 LOG(
ERROR) <<
"Cowardly refusing to add more entries since baseIndex_ " 56 VLOG(6) <<
"Adding header=" << header;
61 (*refCount_)[
head_] = 0;
70 VLOG(5) <<
"Draining absolute index " <<
minUsable_ <<
" bytes=" 89 bool allowVulnerable)
const {
96 bool allowVulnerable)
const {
97 auto it =
names_.find(headerName);
101 bool encoderHasUnackedEntry =
false;
104 for (
auto indexIt = it->second.rbegin(); indexIt != it->second.rend();
107 if (nameOnly ||
table_[
i].value == value) {
113 encoderHasUnackedEntry =
true;
117 if (encoderHasUnackedEntry) {
124 bool allowVulnerable)
const {
126 return getIndexImpl(headerName, value,
true , allowVulnerable);
138 CHECK_EQ((*
refCount_)[idx], 0) <<
"Removed header with nonzero references";
143 VLOG(5) <<
"Removing draining entry=" << idx <<
" size=" << removedBytes
144 <<
" drainedBytes_=" <<
drainedBytes_ <<
" new drainedBytes_=" 178 std::move_backward(
refCount_->begin() + oldTail,
185 if (
bytes_ + needed < desiredCapacity ||
199 while (nChecked++ <
size() && freeable < needed && ((*
refCount_)[i] == 0) &&
204 if (freeable < needed) {
205 VLOG(5) <<
"header=" <<
table_[
i].name <<
" blocked eviction, recount=" 218 testIndex -= baseOffset;
230 bool allowVulnerable) {
231 if (relativeIndex ==
UNACKED) {
234 DCHECK(
isValid(relativeIndex));
242 if (allowVulnerable) {
251 return {
false, absIndex};
265 (*refCount_)[index]--;
284 uint32_t absIndex = base - externalIndex + 1;
constexpr detail::Map< Move > move
Encoder::MutableCompressedList list
static const char *const value