Address PR feedback
This commit is contained in:
parent
46001f3cbc
commit
e64fedb20f
1 changed files with 8 additions and 3 deletions
|
@ -8,8 +8,13 @@ namespace ChocolArm64
|
|||
{
|
||||
class ATranslatorCache
|
||||
{
|
||||
private const int MaxTotalSize = 4 * 1024 * 256;
|
||||
private const int MaxTimeDelta = 2 * 60000;
|
||||
//Maximum size of the cache, in bytes, measured in ARM code size.
|
||||
private const int MaxTotalSize = 4 * 1024 * 256;
|
||||
|
||||
//Minimum time required in milliseconds for a method to be eligible for deletion.
|
||||
private const int MinTimeDelta = 2 * 60000;
|
||||
|
||||
//Minimum number of calls required to update the timestamp.
|
||||
private const int MinCallCountForUpdate = 250;
|
||||
|
||||
private class CacheBucket
|
||||
|
@ -134,7 +139,7 @@ namespace ChocolArm64
|
|||
|
||||
int TimeDelta = RingDelta(Bucket.Timestamp, Timestamp);
|
||||
|
||||
if ((uint)TimeDelta <= (uint)MaxTimeDelta)
|
||||
if ((uint)TimeDelta <= (uint)MinTimeDelta)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue