Lines Matching refs:size_t
17 size_t /*capacity*/, int /*num_shard_bits*/, bool /*strict_capacity_limit*/, in NewClockCache() argument
183 size_t charge;
209 inline static size_t CalcTotalCharge( in CalcTotalCharge()
210 Slice key, size_t charge, in CalcTotalCharge()
212 size_t meta_charge = 0; in CalcTotalCharge()
225 inline size_t CalcTotalCharge( in CalcTotalCharge()
247 static size_t hash(const CacheKey& a) { in hash()
248 return static_cast<size_t>(a.hash_value); in hash()
270 void SetCapacity(size_t capacity) override;
272 Status Insert(const Slice& key, uint32_t hash, void* value, size_t charge,
285 size_t GetUsage() const override;
286 size_t GetPinnedUsage() const override;
288 void ApplyToAllCacheEntries(void (*callback)(void*, size_t),
340 bool EvictFromCache(size_t charge, CleanupContext* context);
343 size_t charge, Deleter* deleter, bool hold_reference,
362 size_t head_;
368 std::atomic<size_t> capacity_;
371 std::atomic<size_t> usage_;
374 std::atomic<size_t> pinned_usage_;
398 size_t ClockCacheShard::GetUsage() const { in GetUsage()
402 size_t ClockCacheShard::GetPinnedUsage() const { in GetPinnedUsage()
406 void ClockCacheShard::ApplyToAllCacheEntries(void (*callback)(void*, size_t), in ApplyToAllCacheEntries() argument
430 size_t total_charge = handle->CalcTotalCharge(metadata_charge_policy_); in RecycleHandle()
461 size_t total_charge = handle->CalcTotalCharge(metadata_charge_policy_); in Ref()
482 size_t total_charge = handle->CalcTotalCharge(metadata_charge_policy_); in Unref()
523 bool ClockCacheShard::EvictFromCache(size_t charge, CleanupContext* context) { in EvictFromCache()
524 size_t usage = usage_.load(std::memory_order_relaxed); in EvictFromCache()
525 size_t capacity = capacity_.load(std::memory_order_relaxed); in EvictFromCache()
529 size_t new_head = head_; in EvictFromCache()
549 void ClockCacheShard::SetCapacity(size_t capacity) { in SetCapacity()
565 void* value, size_t charge, in Insert()
568 size_t total_charge = in Insert()
613 size_t charge, Deleter* deleter, in Insert()
704 ClockCache(size_t capacity, int num_shard_bits, bool strict_capacity_limit, in ClockCache()
732 size_t GetCharge(Handle* handle) const override { in GetCharge()
749 size_t capacity, int num_shard_bits, bool strict_capacity_limit, in NewClockCache()