Skip to content

Commit 309612a

Browse files
authored
Fix RSS size on OS X
`resident_size` is given in bytes, but vmprof expects KiB
1 parent 9eba759 commit 309612a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/rss_darwin.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static long get_current_proc_rss(void)
2424

2525
kern_return_t error = task_info(mach_task, MACH_TASK_BASIC_INFO, (task_info_t)&taskinfo, &out_count);
2626
if (error == KERN_SUCCESS) {
27-
return taskinfo.resident_size;
27+
return taskinfo.resident_size / 1024;
2828
} else {
2929
return -1;
3030
}

0 commit comments

Comments
 (0)