Blender V4.3
blender::memory_cache::Cache Struct Reference

Public Attributes

CacheMap map
 
std::atomic< int64_tlogical_time = 0
 
std::atomic< int64_tapproximate_limit = 1024 * 1024 * 1024
 
std::atomic< int64_tsize_in_bytes = 0
 
std::mutex global_mutex
 
MemoryCount memory
 
Vector< const GenericKey * > keys
 

Detailed Description

Definition at line 35 of file memory_cache.cc.

Member Data Documentation

◆ approximate_limit

std::atomic<int64_t> blender::memory_cache::Cache::approximate_limit = 1024 * 1024 * 1024

◆ global_mutex

std::mutex blender::memory_cache::Cache::global_mutex

◆ keys

Vector<const GenericKey *> blender::memory_cache::Cache::keys

Keys currently cached. This is stored separately from the map, because the map does not allow thread-safe iteration.

Definition at line 53 of file memory_cache.cc.

Referenced by blender::memory_cache::clear(), blender::memory_cache::get_base(), and blender::memory_cache::try_enforce_limit().

◆ logical_time

std::atomic<int64_t> blender::memory_cache::Cache::logical_time = 0

Definition at line 38 of file memory_cache.cc.

Referenced by blender::memory_cache::get_base().

◆ map

CacheMap blender::memory_cache::Cache::map

◆ memory

MemoryCount blender::memory_cache::Cache::memory

Amount of memory currently used in the cache.

Definition at line 48 of file memory_cache.cc.

Referenced by blender::memory_cache::clear(), blender::memory_cache::get_base(), and blender::memory_cache::try_enforce_limit().

◆ size_in_bytes

std::atomic<int64_t> blender::memory_cache::Cache::size_in_bytes = 0

This is derived from memory below, but is atomic for safe access when the global mutex is not locked.

Definition at line 44 of file memory_cache.cc.

Referenced by blender::memory_cache::clear(), blender::memory_cache::get_base(), and blender::memory_cache::try_enforce_limit().


The documentation for this struct was generated from the following file: