perf(esp32): move WiFi statics from SRAM2 to DRAM1 (~14 KB) - #56
Merged
Conversation
Place the RX ring buffer in a .rxring section and ISR/timer arrays in a .wifibss section, both mapped to SRAM1 (DRAM1) by the ESP32 linker script, and then guard the DMA relocation tables. On ESP32 this frees ~14 KB of SRAM2 for the Go GC heap: - RX ring (6 × 1602 B): ~9.6 KB - DMA tables compiled out: ~1.9 KB - ISR + timer arrays: ~2.8 KB Signed-off-by: deadprogram <[email protected]>
deadprogram
force-pushed
the
esp32-better-dram1-usage
branch
from
July 25, 2026 13:18
a8f9fb6 to
49356b4
Compare
Signed-off-by: deadprogram <[email protected]>
Wire xnet.StackConfig.AcceptIPv4Broadcast through espradio.StackConfig so AP-mode stacks accept IPv4 broadcast destinations. Required for DHCP server to receive client Discovers/Requests sent to 255.255.255.255. Enable it in netlink/ap.go and examples/ap. Signed-off-by: deadprogram <[email protected]>
Member
Author
|
Thank you for review @soypat now merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Place the RX ring buffer in a .rxring section and ISR/timer arrays in a .wifibss section, both mapped to SRAM1 (DRAM1) by the ESP32 linker script, and then guard the DMA relocation tables.
On ESP32 this frees ~14 KB of SRAM2 for the Go GC heap:
Requires that tinygo-org/tinygo#5555 be merged, due to needing the additional linker symbols.
With this PR there is enough memory for ESP32 to use
net/httplike the other currently supported processors. Here is thewebserverexample running on ESP32: