libc64.go 812 B

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