After discovering that MBEDTLS requires at least 48000 bytes of heap to function, I've had to desperately find some spare bytes to conduct a TLS session over WiFi using a nRF5340 (with nRF7002 for WiFi).
The biggest single allocation is from CONFIG_HEAP_MEM_POOL_SIZE. By default it is 153000. Why? I can't figure out where this number comes from, or how to figure that out.
Note I'm using ncs 2.5.2, so that's before all the HEAP_MEM_POOL_ADD_SIZE_* stuff. All I can find is defaults of about 4096 for Bluetooth, and dramatically, 98304 for WiFi on some non-Nordic boards. So can't see why I'd need 153000, yet if I reduce it to 100000 it fails.
Is there any opportunity to shave some bytes off, or is the figure quite accurate?