gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

libc64.go (812B)


      1 // Copyright 2020 The Libc 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 //go:build amd64 || arm64 || ppc64le || riscv64 || s390x
      6 // +build amd64 arm64 ppc64le riscv64 s390x
      7 
      8 package libc // import "modernc.org/libc"
      9 
     10 const (
     11 	heapSize = 2 << 30 // Adjust for your debugging session requirements and system RAM size.
     12 )
     13 
     14 type (
     15 	// RawMem represents the biggest byte array the runtime can handle
     16 	RawMem [1<<50 - 1]byte
     17 
     18 	// 48-5*8 = 8 bytes left to pad
     19 	stackHeaderPadding struct {
     20 		a uintptr
     21 	}
     22 )
     23 
     24 type bits []int
     25 
     26 func newBits(n int) (r bits)  { return make(bits, (n+63)>>6) }
     27 func (b bits) has(n int) bool { return b != nil && b[n>>6]&(1<<uint(n&63)) != 0 }
     28 func (b bits) set(n int)      { b[n>>6] |= 1 << uint(n&63) }