From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iu8QC-0004E6-8T for qemu-devel@nongnu.org; Mon, 19 Nov 2007 10:20:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iu8QB-0004DQ-Lp for qemu-devel@nongnu.org; Mon, 19 Nov 2007 10:20:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iu8QB-0004DG-IB for qemu-devel@nongnu.org; Mon, 19 Nov 2007 10:20:23 -0500 Received: from smtp.citrix.com ([66.165.176.89]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iu8QB-0006YI-43 for qemu-devel@nongnu.org; Mon, 19 Nov 2007 10:20:23 -0500 Received: from gw-uk.xensource.com (wiley.uk.xensource.com [172.31.0.37]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id lAJFKGVb003766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 19 Nov 2007 07:20:18 -0800 Received: from dhcp-16-192.uk.xensource.com ([172.31.16.192] helo=implementation.famille.thibault.fr) by gw-uk.xensource.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.43) id 1Iu8Q4-0005NH-AR for qemu-devel@nongnu.org; Mon, 19 Nov 2007 15:20:16 +0000 Received: from samy by implementation.famille.thibault.fr with local (Exim 4.68) (envelope-from ) id 1Iu8Q4-0004Eb-5Z for qemu-devel@nongnu.org; Mon, 19 Nov 2007 16:20:16 +0100 Date: Mon, 19 Nov 2007 15:20:16 +0000 From: Samuel Thibault Message-ID: <20071119152016.GE6331@implementation.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] memory usage and ioports Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, Qemu currently uses 6 65k tables of pointers for handling ioports, which makes 3MB on 64bit machines. There's a comment that says "XXX: use a two level table to limit memory usage". But wouldn't it be more simple and effective to just allocate them through mmap() and when a NULL pointer is read, call the default handlers? Samuel