mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
esp32: remove dead code and fix GC root scanning
Remove unused cpuIntUsed and cpuIntToPeripheral variables from interrupt_esp32.go because these were declared but never read. Fix _globals_end in the linker script to cover .data in addition to .bss and .wifi_bss. Previously the GC scan range ended at _wifi_bss_end, missing any heap pointers stored in initialized globals (.data section). Extend to _edata so the conservative collector sees all global root pointers. Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
+1
-1
@@ -185,7 +185,7 @@ SECTIONS
|
||||
|
||||
/* For the garbage collector. */
|
||||
_globals_start = _sbss;
|
||||
_globals_end = _wifi_bss_end;
|
||||
_globals_end = _edata;
|
||||
_heap_start = _edata;
|
||||
/* Go GC heap = the rest of SRAM2 above .data (~113KB), a single safe contiguous
|
||||
* block. The WiFi arena lives in DRAM1 (SRAM1 pool 7/6), so its ~64KB does not
|
||||
|
||||
Reference in New Issue
Block a user