Slight change to Mach API for collecting memory usage.

This commit is contained in:
Seth Hall 2016-01-06 22:28:57 -05:00
parent 13cf6e6112
commit 6aeeb94d76

View file

@ -1664,15 +1664,14 @@ void get_memory_usage(unsigned int* total, unsigned int* malloced)
if ( malloced )
*malloced = mi.uordblks;
#endif
#ifdef HAVE_DARWIN
struct task_basic_info t_info;
mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT;
struct mach_task_basic_info t_info;
mach_msg_type_number_t t_info_count = MACH_TASK_BASIC_INFO;
if ( KERN_SUCCESS != task_info(mach_task_self(),
TASK_BASIC_INFO,
MACH_TASK_BASIC_INFO,
(task_info_t)&t_info,
&t_info_count) )
ret_total = 0;