CodeBlock: Add a shared IsAlmostFull function

This function shall keep care about the low watermark of code space.
If we ran out of space, the JITs shall clear their block cache.
This commit is contained in:
degasus
2015-07-15 08:53:05 +02:00
parent a5c10ded55
commit 6f38d1baa1
4 changed files with 9 additions and 6 deletions

View File

@ -72,5 +72,11 @@ public:
{
return region_size - (T::GetCodePtr() - region);
}
bool IsAlmostFull() const
{
// This should be bigger than the biggest block ever.
return GetSpaceLeft() < 0x10000;
}
};