diff --git a/source/posix/system_resource_utils.c b/source/posix/system_resource_utils.c index 2091ee9b8..228ed1ac6 100644 --- a/source/posix/system_resource_utils.c +++ b/source/posix/system_resource_utils.c @@ -7,8 +7,8 @@ #include -int aws_memory_usage_for_current_process(struct aws_memory_usage *mu) { - AWS_PRECONDITION(mu); +int aws_memory_usage_for_current_process(struct aws_memory_usage *memory_usage) { + AWS_PRECONDITION(memory_usage); struct rusage usage; @@ -22,10 +22,10 @@ int aws_memory_usage_for_current_process(struct aws_memory_usage *mu) { * around MacOS 10.6. * Make it back to KB. Result might be slightly off due to rounding. */ - mu->maxrss = usage.ru_maxrss / 1024; + memory_usage->maxrss = usage.ru_maxrss / 1024; #else - mu->maxrss = usage.ru_maxrss; + memory_usage->maxrss = usage.ru_maxrss; #endif - mu->page_faults = usage.ru_majflt; + memory_usage->page_faults = usage.ru_majflt; return AWS_OP_SUCCESS; } diff --git a/source/windows/system_resource_utils.c b/source/windows/system_resource_utils.c index ba3f8e637..b116f0a0b 100644 --- a/source/windows/system_resource_utils.c +++ b/source/windows/system_resource_utils.c @@ -9,8 +9,8 @@ #include -int aws_memory_usage_for_current_process(struct aws_memory_usage *mu) { - AWS_PRECONDITION(mu); +int aws_memory_usage_for_current_process(struct aws_memory_usage *memory_usage) { + AWS_PRECONDITION(memory_usage); HANDLE hProcess = GetCurrentProcess(); @@ -23,8 +23,8 @@ int aws_memory_usage_for_current_process(struct aws_memory_usage *mu) { return aws_raise_error(AWS_ERROR_SYS_CALL_FAILURE); } - mu->maxrss = pmc.PeakWorkingSetSize; - mu->page_faults = pmc.PageFaultCount; + memory_usage->maxrss = pmc.PeakWorkingSetSize; + memory_usage->page_faults = pmc.PageFaultCount; return AWS_OP_SUCCESS; }