Wow. This is way harder than I expected it to be. What I want is something that seems super obvious to me: a number for how much memory is in use so I can log it. @KodeZwerg thanks for the windows code. For linux, it seems as though I read /proc/meminfo.
But that doesn't work for OSX. It seems like task_info is the thing I want, but I can't find a FPC translation for task_info.h. Is that because I'm looking in the wrong place or in the wrong way, or is it something that should be done? I'd do it, but I know nothing about header file translation on OSX