mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-08 09:57:21 -05:00
[PR #1625] fix(labs): correct ESP32 SRAM field and OOM ratio in Lab 01 #9231
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1625
Author: @Shashank-Tripathi-07
Created: 5/3/2026
Status: 🔄 Open
Base:
dev← Head:fix/lab01-esp32-sram-oom-ratio📝 Commits (1)
145fc35fix(labs): use ESP32 SRAM capacity for OOM ratio in lab 01📊 Changes
1 file changed (+6 additions, -6 deletions)
View changed files
📝
labs/vol1/lab_01_ml_intro.py(+6 -6)📄 Description
Bug
labs/vol1/lab_01_ml_intro.pyline 67 readsESP32.memory.capacityto get the ESP32's memory size, butmemory.capacityreturns the 8 MB flash storage, not SRAM.The correct field is
ESP32.memory.sram_capacity= 512 KiB.Impact
ESP32_RAM_KBwas 7812 (flash) instead of 512 (SRAM), making the OOM ratio compute as ~6x instead of the correct ~98x. Every downstream callout, badge, and answer reveal in Part C showed fabricated numbers.Fix
ESP32.memory.capacity.m_as("KiB")→ESP32.memory.sram_capacity.m_as("KiB")200x Out of Memory→~100x Out of Memory~200x over budget→~100x over budgetVerification
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.