* cacheutil.cxx (find_any_dirty): Make sure the line is valid before
checking the dirty bit.
(vacancy_p): Line is also vacant if it is not valid.
+2004-05-10 Dave Brolley <brolley@redhat.com>
+
+ * cacheutil.cxx (find_any_dirty): Make sure the line is valid before
+ checking the dirty bit.
+ (vacancy_p): Line is also vacant if it is not valid.
+
2004-04-29 Dave Brolley <brolley@redhat.com>
* cacheutil.cxx (cache_set::expell_line): Don't update the set here.
for (iterator_t it = lines.begin (); it != lines.end (); it++)
{
cache_line* i = * it;
- if (i->dirty_p ()) return i;
+ if (i->valid_p () && i->dirty_p ()) return i;
}
return 0;
cache_set::vacancy_p () const
{
for (const_iterator_t it = lines.begin (); it != lines.end (); it++)
- if (!(*it)->locked_p ())
+ if (!(*it)->valid_p () || !(*it)->locked_p ())
return true;
return false;