34 #elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
36 #include <sys/resource.h>
47 PROCESS_MEMORY_COUNTERS info;
48 GetProcessMemoryInfo( GetCurrentProcess( ), &info,
sizeof(info) );
49 return (
uint64)info.PeakWorkingSetSize;
51 #elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
54 getrusage( RUSAGE_SELF, &rusage );
55 return (
uint64)(rusage.ru_maxrss * 1024L);