0
0
Fork 0

moved fields requiring 64-bit alignment to start of struct

several data structures had a pointer at the start of the struct
on some 32-bit systems, this causes the remaining fields no longer
be aligned on 64-bit boundaries

the fix identifed by @pmezard is to put the counters first in the
struct, which guarantees correct alignment

fixes #359
This commit is contained in:
Marty Schoch 2016-03-20 10:35:24 -04:00
parent 5ea6b063ad
commit 3dc64de478
3 changed files with 3 additions and 3 deletions

View File

@ -17,12 +17,12 @@ import (
)
type indexStat struct {
f *Firestorm
updates, deletes, batches, errors uint64
analysisTime, indexTime uint64
termSearchersStarted uint64
termSearchersFinished uint64
numPlainTextBytesIndexed uint64
f *Firestorm
}
func (i *indexStat) statsMap() map[string]interface{} {

View File

@ -17,12 +17,12 @@ import (
)
type indexStat struct {
i *UpsideDownCouch
updates, deletes, batches, errors uint64
analysisTime, indexTime uint64
termSearchersStarted uint64
termSearchersFinished uint64
numPlainTextBytesIndexed uint64
i *UpsideDownCouch
}
func (i *indexStat) statsMap() map[string]interface{} {

View File

@ -16,9 +16,9 @@ import (
)
type IndexStat struct {
i *indexImpl
searches uint64
searchTime uint64
i *indexImpl
}
func (is *IndexStat) statsMap() map[string]interface{} {