mx.set_memory_limit — returns the previous limit. At the limit the
allocator reclaims/waits instead of ballooning past it. Defense in
depth under admission control ONLY: it does NOT make Metal
command-buffer OOM catchable (that throw comes
from a completion handler and is std::terminate).
mx.set_memory_limit — returns the previous limit. At the limit the allocator reclaims/waits instead of ballooning past it. Defense in depth under admission control ONLY: it does NOT make Metal command-buffer OOM catchable (that throw comes from a completion handler and is std::terminate).