mirror of https://github.com/ethereum/go-ethereum
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
228 B
17 lines
228 B
6 years ago
|
package bigcache
|
||
|
|
||
|
func max(a, b int) int {
|
||
|
if a > b {
|
||
|
return a
|
||
|
}
|
||
|
return b
|
||
|
}
|
||
|
|
||
|
func convertMBToBytes(value int) int {
|
||
|
return value * 1024 * 1024
|
||
|
}
|
||
|
|
||
|
func isPowerOfTwo(number int) bool {
|
||
|
return (number & (number - 1)) == 0
|
||
|
}
|