lsa: Fix documentation for eviction functions

This commit is contained in:
Tomasz Grabiec
2015-08-26 12:20:08 +02:00
parent 295ec3bfae
commit 42dce17c82
2 changed files with 8 additions and 6 deletions

View File

@@ -796,12 +796,7 @@ public:
return _compaction_enabled;
}
//
// Returns true if this pool is evictable and evict_some() will make some forward progress, so
// this will eventually stop:
//
// while (evictable()) { evict_some(); }
//
// Returns true if this pool is evictable, so that evict_some() can be called.
bool is_evictable() const {
return _evictable;
}

View File

@@ -15,6 +15,13 @@ struct occupancy_stats;
class region;
class region_impl;
//
// Frees some amount of objects from the region to which it's attached.
//
// Should always make forward progress unless region is empty, so this should eventually stop:
//
// while (!region.empty()) { eviction_fn(); }
//
using eviction_fn = std::function<void()>;
// Groups regions for the purpose of statistics. Can be nested.