I need to retrieve the name of the most memory intensive application* on OS X. The solution should be in Objective-C while preferably refraining from using 3rd party APIs. The solution cannot contain any parsing.
*The memory intensity of an application can be defined as the amount of real memory in use by that application.
Bash is pretty good for things like this. Using bash you can have the command:
(could probably be optimised, but it still works)
Then do something like:
The bash command works, the objective c code is untested though.