You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pvPortMalloc forwarded every request to the host malloc, so the simulated
heap never ran out. configTOTAL_HEAP_SIZE was tracked for reporting but
not enforced, vApplicationMallocFailedHook could not fire, and Sys Info
showed zero allocation errors no matter what the firmware did. Code paths
that check a pvPortMalloc result, and bugs that only appear when one
returns null, were unreachable in simulation.
Refuse allocations past the budget and count them, matching what heap_4
does on the watch. The first failure is reported on stderr so the null
dereference that may follow has its cause in the log.
Add INFINISIM_HEAP_BALLAST, which withholds a fixed number of bytes from
the budget. The simulator boots with roughly 19 KB more free than the
watch because it carries no BLE stack, so an enforced budget alone still
leaves far more headroom than hardware has. Reserving the difference
makes a run reproduce the margin the firmware actually has. Unset, it
changes nothing.
Replace the accumulate over the allocation map with a running total,
since the budget check now runs on every allocation.
0 commit comments