pub fn internal_free() -> usizeExpand description
Free bytes in the global heap’s internal DRAM regions (reclaimed-ROM + plain-DRAM), right now. The tight resource on both boards; use it to compare totals (e.g. before/after moving a subsystem’s heap to PSRAM).
A sum, not headroom. It cannot answer “will a block of N bytes allocate”: the regions are separate and each fragments independently, so a large total can hold no large block. Measured on fire27 — 39,172 B free and a 23,760 B request refused, with the caller retrying 73,679 times. A gate built on this number passes exactly the case that fails. To know whether an allocation will succeed, attempt it and free it.