From 19d5cc0e66b529fad0d54daf7ff1fd482813efa5 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 22 Sep 2013 09:46:23 +0200 Subject: Updated coding style to match ours. --- source/WebAdmin.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/WebAdmin.cpp') diff --git a/source/WebAdmin.cpp b/source/WebAdmin.cpp index 65d50dbd9..e53fb84e6 100644 --- a/source/WebAdmin.cpp +++ b/source/WebAdmin.cpp @@ -451,14 +451,18 @@ int cWebAdmin::GetMemoryUsage(void) } return -1; #elif defined (__APPLE__) + // Code adapted from http://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process struct task_basic_info t_info; mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT; - if (KERN_SUCCESS == task_info(mach_task_self(), - TASK_BASIC_INFO, (task_info_t)&t_info, - &t_info_count)) + if (KERN_SUCCESS == task_info( + mach_task_self(), + TASK_BASIC_INFO, + (task_info_t)&t_info, + &t_info_count + )) { - return (int)(t_info.resident_size/1024); + return (int)(t_info.resident_size / 1024); } return -1; #else -- cgit v1.2.3