mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect/promql: use universal approach for determining maxByteSliceLen on 32-bit and 64-bit archs
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/235
This commit is contained in:
parent
d297b65089
commit
c33640664a
4 changed files with 5 additions and 9 deletions
5
app/vmselect/promql/arch.go
Normal file
5
app/vmselect/promql/arch.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
package promql
|
||||
|
||||
import "unsafe"
|
||||
|
||||
const maxByteSliceLen = 1<<(31+9*(unsafe.Sizeof(int(0))/8)) - 1
|
|
@ -1,3 +0,0 @@
|
|||
package promql
|
||||
|
||||
const maxByteSliceLen = 1<<31 - 1
|
|
@ -1,3 +0,0 @@
|
|||
package promql
|
||||
|
||||
const maxByteSliceLen = 1 << 40
|
|
@ -1,3 +0,0 @@
|
|||
package promql
|
||||
|
||||
const maxByteSliceLen = 1<<31 - 1
|
Loading…
Reference in a new issue