The Vish Visualization Shell 0.3
Vish
Public Member Functions | Public Attributes | List of all members
MemCore::CacheMultiQueue Struct Reference

Cache queues of different purpose. More...

#include <elementary/memcore/CacheMultiQueue.hpp>

Public Member Functions

bool adjust (const CacheBase &theCache, memsize_t newCost)
 Try to release objects in this queue system such that the new object fits into the allowed total costs.
 
void insert_zombie (const WeakPtr< Cacheable > &Ca)
 insert an object that is already dead.
 
int iterate (CacheQueue::Iterator &PrimaryIt, CacheQueue::Iterator &UnreleasableIt) const
 Iterate over the cache queues.
 
int nEntries () const
 Count the number of entries here.
 
memsize_t purge_Hades ()
 cleanse all dead objects
 

Public Attributes

Hades_t Hades
 Objects that happen to hang around, just to be deleted at next chance.
 
RefPtr< CacheQueuePrimary
 Normal objects.
 
RefPtr< CacheQueueTemporaryUnreleasable
 Objects that are not releasable at the moment, but might be soon.
 
RefPtr< CacheQueueUnreleasable
 Objects that are known to be not releasable.
 

Detailed Description

Cache queues of different purpose.

Member Function Documentation

◆ iterate()

int MemCore::CacheMultiQueue::iterate ( CacheQueue::Iterator PrimaryIt,
CacheQueue::Iterator UnreleasableIt 
) const
inline

Iterate over the cache queues.

Returns
number of elements traversed.

Referenced by Wizt::Seagrass::computeAnemonesMemory(), Wizt::Seagrass::getCachedAnemonesMemory(), and Wizt::Seagrass::getNumberOfAnemones().

◆ nEntries()

int MemCore::CacheMultiQueue::nEntries ( ) const
inline

Count the number of entries here.

Never call this function, it is maximally slow.