mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
rp2040: fix -gc=leaking/none
This commit is contained in:
@@ -8,11 +8,16 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/task"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const needsStaticHeap = true
|
||||
|
||||
var gcScanState atomic.Uint32
|
||||
|
||||
func scanCurrentStack() {}
|
||||
|
||||
// Ever-incrementing pointer: no memory is freed.
|
||||
var heapptr uintptr
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ package runtime
|
||||
// targets that have far too little RAM even for the leaking memory allocator.
|
||||
|
||||
import (
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@@ -15,6 +16,9 @@ const needsStaticHeap = false
|
||||
var gcTotalAlloc uint64 // for runtime.MemStats
|
||||
var gcMallocs uint64
|
||||
var gcFrees uint64
|
||||
var gcScanState atomic.Uint32
|
||||
|
||||
func scanCurrentStack() {}
|
||||
|
||||
func alloc(size uintptr, layout unsafe.Pointer) unsafe.Pointer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user