From 2d1042adb382aa95456beff31b40abb7196567a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 6 Oct 2020 13:13:16 +0200 Subject: Save text buffer in Meter --- linux/HugePageMeter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linux/HugePageMeter.c') diff --git a/linux/HugePageMeter.c b/linux/HugePageMeter.c index 242d2857..2a35c125 100644 --- a/linux/HugePageMeter.c +++ b/linux/HugePageMeter.c @@ -31,9 +31,11 @@ static const char* const HugePageMeter_labels[] = { " 1G:", " 2G:", " 4G:", " 8G:", " 16G:", " 32G:", " 64G:", " 128G:", " 256G:", " 512G:", }; -static void HugePageMeter_updateValues(Meter* this, char* buffer, size_t size) { +static void HugePageMeter_updateValues(Meter* this) { assert(ARRAYSIZE(HugePageMeter_labels) == HTOP_HUGEPAGE_COUNT); + char* buffer = this->txtBuffer; + size_t size = sizeof(this->txtBuffer); int written; memory_t usedTotal = 0; unsigned nextUsed = 0; -- cgit v1.2.3