Skip to content

fix(emulator): correct heap_size calculation in LinearMemoryLayout::tracked_ram_size#551

Merged
sjudson merged 1 commit intonexus-xyz:mainfrom
kurahin:fix/emulator-tracked-ram-heap-size
Dec 10, 2025
Merged

fix(emulator): correct heap_size calculation in LinearMemoryLayout::tracked_ram_size#551
sjudson merged 1 commit intonexus-xyz:mainfrom
kurahin:fix/emulator-tracked-ram-heap-size

Conversation

@kurahin
Copy link
Contributor

@kurahin kurahin commented Dec 10, 2025

Previously, heap_size was computed as heap - heap_start, which always evaluated to zero because heap_start returns the same field. This caused tracked_ram_size to undercount RAM-checked addresses by entirely omitting the heap. The calculation now uses heap_end() - heap_start(), which reflects the actual heap span between the heap base and the stack bottom

@github-actions
Copy link

github-actions bot commented Dec 10, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@kurahin
Copy link
Contributor Author

kurahin commented Dec 10, 2025

I have read the CLA Document and I hereby sign the CLA

@sjudson
Copy link
Contributor

sjudson commented Dec 10, 2025

Excellent catch, this definitely would be a problem.

@sjudson sjudson merged commit e6b1bca into nexus-xyz:main Dec 10, 2025
20 of 21 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants