runtime: unify GC interface

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.
This commit is contained in:
Ayke van Laethem
2018-11-17 14:11:58 +01:00
parent 4fdffdf8b2
commit 15a4afb22a
9 changed files with 37 additions and 47 deletions
+9 -1
View File
@@ -12,4 +12,12 @@ const GOARCH = "avr"
const TargetBits = 8
//go:extern _heap_start
var heapStart unsafe.Pointer
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
}