From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aePP4-0008IR-Jo for qemu-devel@nongnu.org; Fri, 11 Mar 2016 10:55:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aePP3-00083a-Pq for qemu-devel@nongnu.org; Fri, 11 Mar 2016 10:55:02 -0500 Sender: Paolo Bonzini References: From: Paolo Bonzini Message-ID: <56E2EA4F.3020803@redhat.com> Date: Fri, 11 Mar 2016 16:54:55 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] BitsSizedTasks-LargeFrames List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Siddharth Gupta , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org Hi Siddharth, because you are touching possibly "hot" code paths, it is not possible to just move the allocation to the heap. You will have to check whether the number of used items is low enough and, if not, switch from the stack-allocated array to the heap. This way the stack-allocated array can be made smaller (e.g. 2K). Thanks, Paolo On 11/03/2016 15:50, Siddharth Gupta wrote: >