From 0a2ccef4d3096c4f86c68dd557c3c8c55975fd00 Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Mon, 2 Jan 2023 08:13:47 +0100 Subject: [PATCH] fix helper function to determine actual RAM size --- nyx/snapshot/helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nyx/snapshot/helper.c b/nyx/snapshot/helper.c index c45f740724..c8db331f5d 100644 --- a/nyx/snapshot/helper.c +++ b/nyx/snapshot/helper.c @@ -20,7 +20,9 @@ uint64_t get_ram_size(void) RAMBlock *block; uint64_t guest_ram_size = 0; QLIST_FOREACH_RCU (block, &ram_list.blocks, next) { - guest_ram_size += block->used_length; + if(!strcmp(block->idstr, "pc.ram")){ + guest_ram_size += block->used_length; + } #ifdef DEBUG_NYX_SNAPSHOT_HELPER printf("Block: %s (%lx)\n", block->idstr, block->used_length); #endif