]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
command: Show how much memory we managed to allocate
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Aug 2022 16:23:08 +0000 (16:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Aug 2022 16:23:08 +0000 (16:23 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/stub/command.c

index 92dece5469675a20ed040d87f8ff60e123aff792..29a2455941d527e394770def611c4f3162015530 100644 (file)
@@ -106,6 +106,8 @@ static int exhaust_memory(int argc, char* argv[]) {
                        break;
 
                bytes += block;
+
+               printf("Allocated %zu MiB\n", bytes / block);
        }
 
        printf("Successfully allocated %f MiB\n", (double)bytes / 1048576);