github.com/Rookout/GoSDK@v0.1.48/pkg/services/assembler/internal/objabi/stack.go (about)

     1  // Copyright 2011 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE.assembler file.
     4  
     5  package objabi
     6  
     7  import (
     8  	"github.com/Rookout/GoSDK/pkg/services/assembler/internal/abi"
     9  	"github.com/Rookout/GoSDK/pkg/services/assembler/internal/buildcfg"
    10  )
    11  
    12  func StackNosplit(race bool) int {
    13  	
    14  	return abi.StackNosplitBase * stackGuardMultiplier(race)
    15  }
    16  
    17  
    18  
    19  
    20  func stackGuardMultiplier(race bool) int {
    21  	
    22  	n := 1
    23  	
    24  	if buildcfg.GOOS == "aix" {
    25  		n += 1
    26  	}
    27  	
    28  	if race {
    29  		n += 1
    30  	}
    31  	return n
    32  }