From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NoyZm-0005Xi-Te for qemu-devel@nongnu.org; Tue, 09 Mar 2010 07:30:18 -0500 Received: from [199.232.76.173] (port=46603 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoyZm-0005X6-3k for qemu-devel@nongnu.org; Tue, 09 Mar 2010 07:30:18 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NoyZl-00046d-Ej for qemu-devel@nongnu.org; Tue, 09 Mar 2010 07:30:17 -0500 Received: from mx20.gnu.org ([199.232.41.8]:5540) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NoyZl-00046S-7n for qemu-devel@nongnu.org; Tue, 09 Mar 2010 07:30:17 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NoyZj-00005A-Gm for qemu-devel@nongnu.org; Tue, 09 Mar 2010 07:30:15 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 04/17] virtio-9p: Implement P9_TSTAT Date: Tue, 9 Mar 2010 12:30:08 +0000 References: <1267642874-15001-1-git-send-email-aliguori@us.ibm.com> <87vddcjhpv.fsf@linux.vnet.ibm.com> <4B95AD93.1070502@linux.vnet.ibm.com> In-Reply-To: <4B95AD93.1070502@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003091230.08628.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , jvrao , "Aneesh Kumar K. V" , Gautham R Shenoy > Is there any reason (other than being coding style) in using qemu_free() > instead of free()? As per qem-malloc.c qemu_free() is nothing but free(). The whole point of qemu_{malloc,free} is to isolate code from the system implementation of malloc/free. It's entirely possible that future versions of qemu_malloc will use a different memory allocation strategy. > The reason I am asking is.. tracking string allocs become tricky > if some of them were defined using qemu_alloc() and others are allocated > through sprintf(). sprintf does not allocate memory. If you mean strdup, then you shouldn't be using that (use qemu_strdup). Paul