why smallSizeMax - 8 in runtime.mallocgc?

110 views
Skip to first unread message

xie cui

unread,
Jun 5, 2023, 9:59:08 PM6/5/23
to golang-dev
https://github.com/golang/go/blob/bdc6ae579aa86d21183c612c8c37916f397afaa8/src/runtime/malloc.go#L1102

I think it's good idea that change from if size <= smallSizeMax - 8 to if size <= smallSizeMax.

size <=smallSizeMax is clerer.

Keith Randall

unread,
Jun 5, 2023, 10:47:12 PM6/5/23
to golang-dev
That would be fine. I don't think it is a big deal either way.
Reply all
Reply to author
Forward
0 new messages