GET /api/debug/heap/
FreeRTOS and lwIP heap state.
Auth: Bearer (powerUser).
Response 200
Section titled “Response 200”{ "rtos": { "totalBytes": 30720, "freeBytes": 18240, "minEverFreeBytes": 12800, "largestFreeBlockBytes": 14336, "smallestFreeBlockBytes": 16, "freeBlockCount": 7, "allocCount": 1234, "freeCount": 1200 }, "lwip": { "totalBytes": 51200, "freeBytes": 38400, "minEverFreeBytes": 28000 }}Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
rtos.totalBytes | number | Total FreeRTOS heap size (configTOTAL_HEAP_SIZE) |
rtos.freeBytes | number | Current free space (sum of all free blocks) |
rtos.minEverFreeBytes | number | All-time minimum free space (watermark) |
rtos.largestFreeBlockBytes | number | Size of the largest free block (fragmentation indicator) |
rtos.smallestFreeBlockBytes | number | Size of the smallest free block |
rtos.freeBlockCount | number | Number of free blocks |
rtos.allocCount | number | Number of successful pvPortMalloc calls since startup |
rtos.freeCount | number | Number of successful vPortFree calls since startup |
lwip.totalBytes | number | Total lwIP heap size |
lwip.freeBytes | number | Current free space in the lwIP heap |
lwip.minEverFreeBytes | number | All-time minimum free space in the lwIP heap |
When
freeBytes > 0, the FreeRTOS heap fragmentation metric is1 - largestFreeBlockBytes / freeBytes. IflargestFreeBlockBytesis significantly smaller thanfreeBytes, a large allocation may fail despite sufficient total free memory. WhenfreeBytes == 0, the Web UI reports0%without evaluating the formula.