Skip to content

Commit

Permalink
define map size separately for 32 and 64 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
jaffee committed Jun 29, 2018
1 parent 0fae552 commit 4124bc7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 0 additions & 2 deletions translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const (
)

const (
DefaultMapSize = 10 * (1 << 30) // 10GB

DefaultReplicationRetryInterval = 1 * time.Second
)

Expand Down
5 changes: 5 additions & 0 deletions translate_mapsize_386.go
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions translate_mapsize_all64bitsystems.go
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4124bc7

Please sign in to comment.