define map size separately for 32 and 64 bit systems

This commit is contained in:
Matt Jaffee 2018-06-29 07:18:26 -05:00
parent 0fae552577
commit 4124bc76a3
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF
3 changed files with 13 additions and 2 deletions

View file

@ -25,8 +25,6 @@ const (
)
const (
DefaultMapSize = 10 * (1 << 30) // 10GB
DefaultReplicationRetryInterval = 1 * time.Second
)

5
translate_mapsize_386.go Normal file
View file

@ -0,0 +1,5 @@
package pilosa
// DefaultMapSize is the default size of mapped memory for the translate store.
// It is passed as an int to syscall.Mmap and so must be < 2^31
const DefaultMapSize = (1 << 31) - 1 // 2GB

View file

@ -0,0 +1,8 @@
// +build !386
package pilosa
// DefaultMapSize is the default size of mapped memory for the translate store.
// It is passed as an int to syscall.Mmap and so can only be larger than 2^31 on
// 64bit systems.
const DefaultMapSize = 10 * (1 << 30) // 10GB