bitkeeper revision 1.1236.3.1 (421f2a35S4BT09otLbDXG1U-Qs355g)

Added some defensive code to notice when we're run out of
map cache entries.

Signed-off-by: michael.fetterman@cl.cam.ac.uk
This commit is contained in:
maf46@burn.cl.cam.ac.uk committed 2005-02-25 13:37:57 +00:00
1 parent 2a022479a2
commit e5dc435210
1 file changed
+10
+10
View File
@@ -44,6 +44,9 @@ void *map_domain_mem(unsigned long pa)
unsigned long va;
unsigned int idx, cpu = smp_processor_id();
unsigned long *cache = mapcache;
#ifndef NDEBUG
unsigned flush_count = 0;
#endif
ASSERT(!in_irq());
perfc_incrc(map_domain_mem_count);
@@ -66,6 +69,13 @@ void *map_domain_mem(unsigned long pa)
perfc_incrc(domain_page_tlb_flush);
local_flush_tlb();
shadow_epoch[cpu] = ++epoch;
#ifndef NDEBUG
if ( unlikely(flush_count++) )
{
// we've run out of map cache entries...
BUG();
}
#endif
}
}
while ( cache[idx] != 0 );
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.