From 42dce17c82ecbf5fd04df1577cd4a5a6e557f4eb Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Wed, 26 Aug 2015 12:20:08 +0200 Subject: [PATCH] lsa: Fix documentation for eviction functions --- utils/logalloc.cc | 7 +------ utils/logalloc.hh | 7 +++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/utils/logalloc.cc b/utils/logalloc.cc index ac76338c75..f31fc3888e 100644 --- a/utils/logalloc.cc +++ b/utils/logalloc.cc @@ -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; } diff --git a/utils/logalloc.hh b/utils/logalloc.hh index 1d06115b60..6c621b8176 100644 --- a/utils/logalloc.hh +++ b/utils/logalloc.hh @@ -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; // Groups regions for the purpose of statistics. Can be nested.