Skip to content

Commit

Permalink
fix: use dirtymake for large malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
joway committed Jun 4, 2024
1 parent a37c8ca commit 21ff3be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lang/mcache/mcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func Malloc(size int, capacity ...int) []byte {
c = capacity[0]
}
if c > maxCachedSize {
return make([]byte, size, c)
return dirtmake.Bytes(size, c)
}

sizeIdx := calcIndex(c)
Expand Down

0 comments on commit 21ff3be

Please sign in to comment.