[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 07/15] qapi: use mmap for QmpInputVisitor

From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 07/15] qapi: use mmap for QmpInputVisitor
Date: Thu, 30 Jun 2016 16:12:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Peter Lieven <address@hidden> writes:

> this struct is approx 75kB

32KiB on x86_64, almost entirely eaten by member stack.

As Dan observed, we use many short-lived QmpInputVisitors.  However, we
should not be using many simultaneously.  That would be necessary for
32KiB objects to have an impact on memory use.  Are you sure these have
an impact?

Implementing a stack as "big enough" array can be wasteful.
Implementing it as dynamically allocated list is differently wasteful.
Saving several mallocs and frees can be worth "wasting" a few pages of
memory for a short time.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]