From c956f114f7fed2d3c9841e6aeced5af2c913fab2 Mon Sep 17 00:00:00 2001 From: Dmitriy Musatkin Date: Fri, 27 Oct 2023 11:06:29 -0700 Subject: [PATCH] allocate a buf before --- tests/system_resource_util_test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/system_resource_util_test.c b/tests/system_resource_util_test.c index ba5945d93..2d0f2683e 100644 --- a/tests/system_resource_util_test.c +++ b/tests/system_resource_util_test.c @@ -3,19 +3,24 @@ * SPDX-License-Identifier: Apache-2.0. */ +#include #include #include static int s_test_memory_usage_maxrss(struct aws_allocator *allocator, void *ctx) { - (void)allocator; (void)ctx; + struct aws_byte_buf temp; + aws_byte_buf_init(&temp, allocator, 8 * 1024 * 1024); + struct aws_memory_usage_stats mu; ASSERT_SUCCESS(aws_init_memory_usage_for_current_process(&mu)); ASSERT_TRUE(mu.maxrss > 0); + aws_byte_buf_clean_up(&temp); + return 0; }