
Make sure every to-be-implemented GC can use the same interface. As a result, a 1MB chunk of RAM is allocated on Unix systems on init instead of allocating on demand.
23 строки
377 Б
Go
23 строки
377 Б
Go
// +build avr
|
|
|
|
package runtime
|
|
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
const GOARCH = "avr"
|
|
|
|
// The bitness of the CPU (e.g. 8, 32, 64).
|
|
const TargetBits = 8
|
|
|
|
//go:extern _heap_start
|
|
var heapStartSymbol unsafe.Pointer
|
|
|
|
var heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
|
|
|
|
// Align on a word boundary.
|
|
func align(ptr uintptr) uintptr {
|
|
// No alignment necessary on the AVR.
|
|
return ptr
|
|
}
|