mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-06 16:56:41 +08:00
improve hash calculation
This commit is contained in:
parent
e3652d8901
commit
8f469b108e
@ -53,7 +53,7 @@ static unsigned int target_address_hash(unsigned long key)
|
||||
} u = { .addr = ARCH_ADDR_T(key) };
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(u.v); ++i)
|
||||
h = (h >> 1) ^ u.v[i];
|
||||
h += (h >> 2) ^ (u.v[i] << 3);
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user