In Windows I can get the Peak Memory usage by calling GetProcessMemoryInfo
function TProcess.Peek: Cardinal;
var
PMC: PPROCESS_MEMORY_COUNTERS;
PMCSize: Cardinal;
begin
PMCSize := SizeOf(PROCESS_MEMORY_COUNTERS);
GetMem(PMC, PMCSize);
try
PMC^.cb := PMCSize;
if GetProcessMemoryInfo(FHandle, PMC, PMCSize) then
Exit(PMC^.PeakWorkingSetSize)
else
Exit(0);
finally
FreeMem(PMC);
end;
end;
What is the Mac OS equivalent to do this?