News for hackers. Stuff that matters.
Re:Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likel... by astrange on Friday May 21, 2021 @05:24AM (#27231972)
Activity Monitor is not a reliable way to inspect memory usage, it's optimized for speed of calculation. Use 'footprint' and 'zprint' or Xcode/Instruments instead.
Re:Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likel... by saagarjha on Friday May 21, 2021 @07:35AM (#27232742)
Activity Monitor measures memory footprint.
Re:Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likel... by smoldesu on Friday May 21, 2021 @10:52AM (#27234776)
Activity Monitor is almost just as useless as Task Manager in terms of reporting memory footprint. Not only will Apple's API constantly hide resources from native apps (like how Safari conveniently hides it's rendering processes), but MacOS's memory model is completely at odds with their measurement techniques. Either way, you're better off using top to measure your system's footprint, if anything.
Re:Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likel... by saagarjha on Friday May 21, 2021 @10:07PM (#27242599)
Apple's APIs don't hide anything, programs on macOS just spawn subprocesses for reasons that mostly have to do with security. top(1) is not a very good way to measure footprint, footprint(1) is (and Activity Monitor uses the same APIs internally for its "Memory" column).
Re:Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likel... by astrange on Friday May 21, 2021 @12:11PM (#27235923)
The way it does it is inaccurate and there’s more columns than that.
Re:Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likel... by saagarjha on Friday May 21, 2021 @10:05PM (#27242590)
As far as I can tell, Activity Monitor and footprint(1) both grab the phys_footprint field from proc_pid_rusage. I have not seem them diverge yet, so if there is more to this that I am missing I (as the author of a system monitoring tool of this sort) would be interested in hearing about it.
Re:Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likel... by astrange on Saturday May 22, 2021 @03:48AM (#27244467)
See "there’s more columns than that". The single process "memory" column does match but AM doesn't show coalition (multiple process) memory totals, the compressed column is an estimate, footprint --vmObjectDirty also exists and is a valid way to look at things, etc.
Re:Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likel... by saagarjha on Saturday May 22, 2021 @04:24AM (#27244640)
Ah, I see what you mean now; yes, it's not reliable in the sense that there are ways to measure it that look a little harder. That being said, I'm not sure I'd classify it as "inaccurate"–it has, in my experience at least, been a fairly good first approximation of memory usage.