summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/msize.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/msize.c')
-rw-r--r--src/pkg/runtime/msize.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pkg/runtime/msize.c b/src/pkg/runtime/msize.c
index ec85eb373..770ef38ce 100644
--- a/src/pkg/runtime/msize.c
+++ b/src/pkg/runtime/msize.c
@@ -57,7 +57,7 @@ runtime·SizeToClass(int32 size)
void
runtime·InitSizes(void)
{
- int32 align, sizeclass, size, osize, nextsize, n;
+ int32 align, sizeclass, size, nextsize, n;
uint32 i;
uintptr allocsize, npages;
@@ -81,8 +81,7 @@ runtime·InitSizes(void)
// the leftover is less than 1/8 of the total,
// so wasted space is at most 12.5%.
allocsize = PageSize;
- osize = size + RefcountOverhead;
- while(allocsize%osize > (allocsize/8))
+ while(allocsize%size > allocsize/8)
allocsize += PageSize;
npages = allocsize >> PageShift;
@@ -93,7 +92,7 @@ runtime·InitSizes(void)
// different sizes.
if(sizeclass > 1
&& npages == runtime·class_to_allocnpages[sizeclass-1]
- && allocsize/osize == allocsize/(runtime·class_to_size[sizeclass-1]+RefcountOverhead)) {
+ && allocsize/size == allocsize/runtime·class_to_size[sizeclass-1]) {
runtime·class_to_size[sizeclass-1] = size;
continue;
}