...

Source file src/runtime/internal/sys/consts.go

Documentation: runtime/internal/sys

     1  // Copyright 2014 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 file.
     4  
     5  package sys
     6  
     7  import (
     8  	"internal/goarch"
     9  	"internal/goos"
    10  )
    11  
    12  // AIX requires a larger stack for syscalls.
    13  // The race build also needs more stack. See issue 54291.
    14  // This arithmetic must match that in cmd/internal/objabi/stack.go:stackGuardMultiplier.
    15  const StackGuardMultiplier = 1 + goos.IsAix + isRace
    16  
    17  // DefaultPhysPageSize is the default physical page size.
    18  const DefaultPhysPageSize = goarch.DefaultPhysPageSize
    19  
    20  // PCQuantum is the minimal unit for a program counter (1 on x86, 4 on most other systems).
    21  // The various PC tables record PC deltas pre-divided by PCQuantum.
    22  const PCQuantum = goarch.PCQuantum
    23  
    24  // Int64Align is the required alignment for a 64-bit integer (4 on 32-bit systems, 8 on 64-bit).
    25  const Int64Align = goarch.PtrSize
    26  
    27  // MinFrameSize is the size of the system-reserved words at the bottom
    28  // of a frame (just above the architectural stack pointer).
    29  // It is zero on x86 and PtrSize on most non-x86 (LR-based) systems.
    30  // On PowerPC it is larger, to cover three more reserved words:
    31  // the compiler word, the link editor word, and the TOC save word.
    32  const MinFrameSize = goarch.MinFrameSize
    33  
    34  // StackAlign is the required alignment of the SP register.
    35  // The stack must be at least word aligned, but some architectures require more.
    36  const StackAlign = goarch.StackAlign
    37  

View as plain text