Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAK-9634 CacheLIRS: test failure with ARM processor #432

Merged
merged 1 commit into from Dec 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1160,10 +1160,7 @@ synchronized V put(K key, int hash, V value, int memory) {
old = e.value;
invalidate(key, hash, RemovalCause.REPLACED);
}
e = new Entry<K, V>();
e.key = key;
e.value = value;
e.memory = memory;
e = new Entry<K, V>(key, value, memory);
Entry<K, V>[] array = entries;
int mask = array.length - 1;
int index = hash & mask;
Expand Down Expand Up @@ -1468,7 +1465,7 @@ static class Entry<K, V> {
/**
* The key.
*/
K key;
final K key;

/**
* The value. Set to null for non-resident-cold entries.
Expand Down Expand Up @@ -1511,6 +1508,16 @@ static class Entry<K, V> {
*/
Entry<K, V> mapNext;

Entry(K key, V value, int memory) {
this.key = key;
this.value = value;
this.memory = memory;
}

Entry() {
this(null, null, 0);
}

/**
* Whether this entry is hot. Cold entries are in one of the two queues.
*
Expand Down