Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(441)

Delta Between Two Patch Sets: src/pkg/runtime/msize.c

Issue 160200044: [dev.power64] code review 160200044: build: merge default into dev.power64 (Closed)
Left Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 months ago
Right Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/mprof.goc ('k') | src/pkg/runtime/netpoll.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(Both sides are equal)
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Malloc small size classes. 5 // Malloc small size classes.
6 // 6 //
7 // See malloc.h for overview. 7 // See malloc.h for overview.
8 // 8 //
9 // The size classes are chosen so that rounding an allocation 9 // The size classes are chosen so that rounding an allocation
10 // request up to the next size class wastes at most 12.5% (1.125x). 10 // request up to the next size class wastes at most 12.5% (1.125x).
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 if(size < MaxSmallSize) { 175 if(size < MaxSmallSize) {
176 if(size <= 1024-8) 176 if(size <= 1024-8)
177 return runtime·class_to_size[runtime·size_to_class8[(siz e+7)>>3]]; 177 return runtime·class_to_size[runtime·size_to_class8[(siz e+7)>>3]];
178 else 178 else
179 return runtime·class_to_size[runtime·size_to_class128[(s ize-1024+127) >> 7]]; 179 return runtime·class_to_size[runtime·size_to_class128[(s ize-1024+127) >> 7]];
180 } 180 }
181 if(size + PageSize < size) 181 if(size + PageSize < size)
182 return size; 182 return size;
183 return ROUND(size, PageSize); 183 return ROUND(size, PageSize);
184 } 184 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b