source: code/trunk/vendor/modernc.org/libc/libc32.go@ 823

Last change on this file since 823 was 822, checked in by yakumo.izuru, 22 months ago

Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 776 bytes
Line 
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 386 || arm
6// +build 386 arm
7
8package libc // import "modernc.org/libc"
9
10const (
11 heapSize = 1 << 30 // Adjust for your debugging session requirements and system RAM size.
12)
13
14type (
15 // RawMem represents the biggest byte array the runtime can handle
16 RawMem [1<<31 - 1]byte
17
18 // 32-5*4 = 12 bytes left to pad
19 stackHeaderPadding struct {
20 a uintptr
21 b uintptr
22 c uintptr
23 }
24)
25
26type bits []int
27
28func newBits(n int) (r bits) { return make(bits, (n+31)>>5) }
29func (b bits) has(n int) bool { return b != nil && b[n>>5]&(1<<uint(n&31)) != 0 }
30func (b bits) set(n int) { b[n>>5] |= 1 << uint(n&31) }
Note: See TracBrowser for help on using the repository browser.