{
  "kind": "arithmetic model, not measured free RAM",
  "checks_passed": 13,
  "checks": [
    "exact part",
    "exact CB capacities",
    "binary KiB",
    "RAM sum not main SRAM",
    "single buffer 4096",
    "single remainder theoretical",
    "double buffer reserves both copies",
    "explicit other allocations",
    "oversized buffer rejected despite total RAM",
    "reject invalid input (-1, 2, 1, 0)",
    "reject invalid input (1, 0, 1, 0)",
    "reject invalid input (1, 2, 0, 0)",
    "reject invalid input (1.5, 2, 1, 0)"
  ],
  "capacities_bytes": {
    "flash": 131072,
    "main_sram": 32768,
    "ccm": 8192,
    "total_ram": 40960
  },
  "cases": {
    "single_32bit": {
      "buffer_bytes": 4096,
      "other_reserved_bytes": 0,
      "remaining_main_sram_bytes": 28672,
      "fits_main_sram": true
    },
    "double_16bit": {
      "buffer_bytes": 4096,
      "other_reserved_bytes": 6144,
      "remaining_main_sram_bytes": 22528,
      "fits_main_sram": true
    },
    "oversized": {
      "buffer_bytes": 40000,
      "other_reserved_bytes": 0,
      "remaining_main_sram_bytes": -7232,
      "fits_main_sram": false
    }
  },
  "limits": "Other reservations are illustrative. Linker placement, stack peaks, heap, alignment and all actual globals need a real build/runtime analysis. CCM is separate, not a DMA buffer extension. No MCU firmware or hardware test."
}
