mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
windows: scan globals conservatively
Scan globals conservatively by reading writable sections from the PE header. I'd like to get rid of needing to precisely scan globals eventually, and this brings us one step closer. It also avoids a bug with ThinLTO on Windows.
This commit is contained in:
committed by
Ron Evans
parent
b52310fed2
commit
5404c81ffd
@@ -11,6 +11,8 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const gcAsserts = false // perform sanity checks
|
||||
|
||||
// Ever-incrementing pointer: no memory is freed.
|
||||
var heapptr = heapStart
|
||||
|
||||
@@ -76,3 +78,7 @@ func setHeapEnd(newHeapEnd uintptr) {
|
||||
// enough.
|
||||
heapEnd = newHeapEnd
|
||||
}
|
||||
|
||||
func markRoots(start, end uintptr) {
|
||||
// dummy, so that markGlobals will compile
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user