diff --git a/src/runtime/mksizeclasses.go b/src/runtime/mksizeclasses.go index bb06ba1eddc32..681259aa524a7 100644 --- a/src/runtime/mksizeclasses.go +++ b/src/runtime/mksizeclasses.go @@ -278,15 +278,6 @@ func printComment(w io.Writer, classes []class) { fmt.Fprintf(w, "\n") } -func maxObjsPerSpan(classes []class) int { - most := 0 - for _, c := range classes[1:] { - n := c.npages * pageSize / c.size - most = max(most, n) - } - return most -} - func printClasses(w io.Writer, classes []class) { fmt.Fprintln(w, "const (") fmt.Fprintf(w, "minHeapAlign = %d\n", minHeapAlign) @@ -296,7 +287,6 @@ func printClasses(w io.Writer, classes []class) { fmt.Fprintf(w, "largeSizeDiv = %d\n", largeSizeDiv) fmt.Fprintf(w, "_NumSizeClasses = %d\n", len(classes)) fmt.Fprintf(w, "_PageShift = %d\n", pageShift) - fmt.Fprintf(w, "maxObjsPerSpan = %d\n", maxObjsPerSpan(classes)) fmt.Fprintln(w, ")") fmt.Fprint(w, "var class_to_size = [_NumSizeClasses]uint16 {") diff --git a/src/runtime/sizeclasses.go b/src/runtime/sizeclasses.go index bbcaa9e983fd0..cebbcc624f849 100644 --- a/src/runtime/sizeclasses.go +++ b/src/runtime/sizeclasses.go @@ -89,7 +89,6 @@ const ( largeSizeDiv = 128 _NumSizeClasses = 68 _PageShift = 13 - maxObjsPerSpan = 1024 ) var class_to_size = [_NumSizeClasses]uint16{0, 8, 16, 24, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 416, 448, 480, 512, 576, 640, 704, 768, 896, 1024, 1152, 1280, 1408, 1536, 1792, 2048, 2304, 2688, 3072, 3200, 3456, 4096, 4864, 5376, 6144, 6528, 6784, 6912, 8192, 9472, 9728, 10240, 10880, 12288, 13568, 14336, 16384, 18432, 19072, 20480, 21760, 24576, 27264, 28672, 32768}