|
|
@@ -24,8 +24,8 @@ const (
|
|
|
const (
|
|
|
decDefMaxDepth = 1024 // maximum depth
|
|
|
decDefSliceCap = 8
|
|
|
- decDefChanCap = 64 // should be large, as cap cannot be expanded
|
|
|
- decScratchByteArrayLen = cacheLineSize // - 5 // + (8 * 2) // - (8 * 1)
|
|
|
+ decDefChanCap = 64 // should be large, as cap cannot be expanded
|
|
|
+ decScratchByteArrayLen = cacheLineSize + (5 * 8) // - 5 // + (8 * 2) // - (8 * 1)
|
|
|
|
|
|
// decContainerLenUnknown is length returned from Read(Map|Array)Len
|
|
|
// when a format doesn't know apiori.
|
|
|
@@ -1372,7 +1372,9 @@ type Decoder struct {
|
|
|
calls uint16 // what depth in mustDecode are we in now.
|
|
|
|
|
|
c containerState
|
|
|
- _ [1]byte // padding
|
|
|
+ _ [1]byte // padding
|
|
|
+
|
|
|
+ // ---- cpu cache line boundary?
|
|
|
b [decScratchByteArrayLen]byte // scratch buffer, used by Decoder and xxxDecDrivers
|
|
|
|
|
|
blist bytesFreelist
|