diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2015-02-26 16:01:58 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2015-02-26 16:01:58 -0700 |
commit | b9c28b721ad8186bdcde91c8731ed87d65c6554d (patch) | |
tree | f79af8a9b160a7041bcb0117d373ea5742b83508 | |
parent | Merge pull request #314 from vdemario/fix_typo_readme (diff) | |
download | dedo-b9c28b721ad8186bdcde91c8731ed87d65c6554d.tar.gz dedo-b9c28b721ad8186bdcde91c8731ed87d65c6554d.tar.xz |
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.
-rw-r--r-- | page.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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{})) |