From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJzmN-0004sx-TA for qemu-devel@nongnu.org; Mon, 04 Jul 2016 05:03:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJzmJ-0005NF-M2 for qemu-devel@nongnu.org; Mon, 04 Jul 2016 05:02:58 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:36720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJzmJ-0005N7-F1 for qemu-devel@nongnu.org; Mon, 04 Jul 2016 05:02:55 -0400 Received: by mail-wm0-x241.google.com with SMTP id c82so20039063wme.3 for ; Mon, 04 Jul 2016 02:02:55 -0700 (PDT) Sender: Paolo Bonzini References: <1467104499-27517-1-git-send-email-pl@kamp.de> <1467104499-27517-8-git-send-email-pl@kamp.de> <87bn2i6a0z.fsf@dusky.pond.sub.org> From: Paolo Bonzini Message-ID: <5e0cdb47-1446-e575-a1c7-c437ac7b8e41@redhat.com> Date: Mon, 4 Jul 2016 11:02:48 +0200 MIME-Version: 1.0 In-Reply-To: <87bn2i6a0z.fsf@dusky.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/15] qapi: use mmap for QmpInputVisitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Peter Lieven Cc: kwolf@redhat.com, peter.maydell@linaro.org, mst@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, kraxel@redhat.com, dgilbert@redhat.com On 30/06/2016 16:12, Markus Armbruster wrote: > 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. Most usage of QmpInputVisitor at startup comes from object_property_set_qobject, which only sets small scalar objects. The stack is entirely unused in this case. Paolo