mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 16:33:40 +00:00
runtime (gc): add garbage collector that uses an external allocator
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// +build darwin linux,!baremetal freebsd,!baremetal
|
||||
|
||||
// +build gc.conservative gc.leaking
|
||||
|
||||
package runtime
|
||||
|
||||
const heapSize = 1 * 1024 * 1024 // 1MB to start
|
||||
|
||||
var heapStart, heapEnd uintptr
|
||||
|
||||
func preinit() {
|
||||
heapStart = uintptr(malloc(heapSize))
|
||||
heapEnd = heapStart + heapSize
|
||||
}
|
||||
Reference in New Issue
Block a user