mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Slight change to Mach API for collecting memory usage.
This commit is contained in:
parent
13cf6e6112
commit
6aeeb94d76
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue