Is there a better way of obtaining GPU memory usage than using `vcdbg reloc`? Since that requires that you flush the cache first, it's not reliable.
The vcgencmd mem_reloc_stats and mem_oom commands are useful, but it would be nice to get the usage before we run out. I notice there is a mem_test command which seems to perform some kind of test allocation. So I can't figure out how much is left by trial and error. But is it atomic? IE, will other processes fail to allocate during the test?
Or, is there some other way of getting the memory usage that I have missed? (Fine if it's an API call).