Increase max array size to 2GB.

This commit changes the maxAllocSize from 256GB to 2GB to handle large
values. It was previously 0xFFFFFFF and I tried adding one more "F" but
it caused an "array too large" error. I played around with the value
some more and found that 0x7FFFFFFF (2GB) is the highest allowed value.

This does not affect how the data is stored. It is simply used for type
converting pointers to array pointers in order to utilize zero copy
from the mmap.
master
Ben Johnson 2015-02-26 16:01:58 -07:00
parent a7d19d8cd5
commit b9c28b721a
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import (
const pageHeaderSize = int(unsafe.Offsetof(((*page)(nil)).ptr))
const maxAllocSize = 0xFFFFFFF
const maxAllocSize = 0x7FFFFFFF
const minKeysPerPage = 2
const branchPageElementSize = int(unsafe.Sizeof(branchPageElement{}))