diff --git a/translate.go b/translate.go index 99a52acf5..695e38f91 100644 --- a/translate.go +++ b/translate.go @@ -24,8 +24,6 @@ const ( ) const ( - DefaultMapSize = 10 * (1 << 30) // 10GB - DefaultReplicationRetryInterval = 1 * time.Second ) diff --git a/translate_mapsize_386.go b/translate_mapsize_386.go new file mode 100644 index 000000000..b8beafa13 --- /dev/null +++ b/translate_mapsize_386.go @@ -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 diff --git a/translate_mapsize_all64bitsystems.go b/translate_mapsize_all64bitsystems.go new file mode 100644 index 000000000..5275c6ec5 --- /dev/null +++ b/translate_mapsize_all64bitsystems.go @@ -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