mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +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
119dfd01bb
commit
3fd32e331a
5 changed files with 5 additions and 12 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
|
|
@ -1,3 +0,0 @@
|
|||
package promql
|
||||
|
||||
const maxByteSliceLen = 1 << 40
|
Loading…
Reference in a new issue