large increase in memory usage after encoding

After encoding with MTLComputeCommandEncoder, my app's memory usage goes from about 450MB to 900MB in the Memory Report. Why would that be? I'm not creating any metal resources on demand.


The memory usage does not increase for subsequent encodings. Unfortunately, Instruments does not report the memory increase (it does not report Metal memory usage).


This seems to be iOS-only. My macOS version (same code) does not report a large memory increase upon encoding.

Actually, with the VM Tracker, I see an increase in resident memory usage for IOKit, suggesting that perhaps one of the MTLBuffers isn't actually reported until it is used.

large increase in memory usage after encoding
 
 
Q