Skip to content

Commit

Permalink
map: remove left over per-CPU marshaler changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmb committed Feb 23, 2021
1 parent 29d1a38 commit b5f3b14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion map.go
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ func (m *Map) unmarshalKey(data interface{}, buf []byte) error {
return unmarshalBytes(data, buf)
}

func (m *Map) marshalValue(data interface{}, batch bool) (internal.Pointer, error) {
func (m *Map) marshalValue(data interface{}) (internal.Pointer, error) {
if m.typ.hasPerCPUValue() {
return marshalPerCPUValue(data, int(m.valueSize))
}
Expand Down
6 changes: 1 addition & 5 deletions marshalers.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,7 @@ func marshalPerCPUValue(slice interface{}, elemLength int) (internal.Pointer, er
}

alignedElemLength := align(elemLength, 8)
alignedSliceLen := possibleCPUs
if sliceLen > alignedSliceLen {
alignedSliceLen = sliceLen
}
buf := make([]byte, alignedElemLength*alignedSliceLen)
buf := make([]byte, alignedElemLength*possibleCPUs)

for i := 0; i < sliceLen; i++ {
elem := sliceValue.Index(i).Interface()
Expand Down

0 comments on commit b5f3b14

Please sign in to comment.