From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHxHl-0001EW-D6 for qemu-devel@nongnu.org; Sat, 20 Jun 2009 05:54:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHxHg-0001E0-OG for qemu-devel@nongnu.org; Sat, 20 Jun 2009 05:54:56 -0400 Received: from [199.232.76.173] (port=43358 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHxHg-0001Dx-Gy for qemu-devel@nongnu.org; Sat, 20 Jun 2009 05:54:52 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:47761) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHxHf-0002OU-Fs for qemu-devel@nongnu.org; Sat, 20 Jun 2009 05:54:52 -0400 From: "Jean-Christophe Dubois" Subject: Re: [Qemu-devel] [PATCH v4 04/12] fix qemu_alloc/qemu_free for linux-user subsystem Date: Sat, 20 Jun 2009 11:54:43 +0200 References: <200906192040.59253.jcd@tribudubois.net> <1245481265.2064.10.camel@system> In-Reply-To: <1245481265.2064.10.camel@system> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_kHLPKAeFOihwHFx" Message-Id: <200906201154.44841.jcd@tribudubois.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: vibi_sreenivasan@cms.com Cc: qemu-devel@nongnu.org --Boundary-00=_kHLPKAeFOihwHFx Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Le samedi 20 juin 2009 09:01:04 vibi sreenivasan, vous avez =C3=A9crit : > > > > This is true. It sounds that the various xxx-user subsystems are not > > using the main qemu_malloc.c implementation. > > > > But this is just a fact ... I am not sure how I should interpret your > > comment. > > since various xxx-user subsystems are not using the main qemu_malloc.c > implementation , your changes would be having a different effect than > intended. Well, I already asked a question about this issue on the list on June 8th (= see=20 attached email) but nobody answered my question. Now the qemu_malloc function signature is just the same and the functionali= ty=20 seems quite equivalent. As I pointed out in the attached email the behavior= is=20 not the same (in particular, no abort() in case of error) but overall I don= 't=20 really see a problem in using these qemu_malloc() instead of malloc() or=20 calloc(). Now if you happen to have a clue on why the linux-user and bsd-user (and no= t=20 darwin-user) targets need to have a different implementation I would be=20 interested to know. JC > > Thanks & Regards > Vibi Sreenivasan > > > JC > > > > > Thanks & Regards > > > Vibi Sreenivasan --Boundary-00=_kHLPKAeFOihwHFx Content-Type: message/rfc822; name="forwarded message" Content-Transfer-Encoding: 7bit Content-Description: "Jean-Christophe Dubois" : [Qemu-devel] question about qemu_malloc and friends in xxx-user/mmap.c Content-Disposition: inline Return-Path: qemu-devel-bounces+jcd=tribudubois.net@nongnu.org Received: from mx1.w4a.fr (LHLO mx1.w4a.fr) (91.121.53.100) by mx1.w4a.fr with LMTP; Mon, 8 Jun 2009 17:44:06 +0100 (GMT+01:00) Received: from localhost (localhost.localdomain [127.0.0.1]) by mx1.w4a.fr (Postfix) with ESMTP id E780813E28 for ; Mon, 8 Jun 2009 18:44:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at srv-05.w4a.fr X-Spam-Flag: NO X-Spam-Score: -5.574 X-Spam-Level: X-Spam-Status: No, score=-5.574 tagged_above=-10 required=6.6 tests=[AWL=1.025, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4] Received: from mx1.w4a.fr ([127.0.0.1]) by localhost (mx1.w4a.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BP-7lY5UcjwS for ; Mon, 8 Jun 2009 18:44:01 +0200 (CEST) Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by mx1.w4a.fr (Postfix) with ESMTP id 5199213E2B for ; Mon, 8 Jun 2009 18:44:01 +0200 (CEST) Received: from localhost ([127.0.0.1]:36369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDhx2-0006ol-8E for jcd@tribudubois.net; Mon, 08 Jun 2009 12:44:00 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDhwu-0006l3-8H for qemu-devel@nongnu.org; Mon, 08 Jun 2009 12:43:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDhwp-0006gl-Bd for qemu-devel@nongnu.org; Mon, 08 Jun 2009 12:43:51 -0400 Received: from [199.232.76.173] (port=34276 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDhwp-0006gZ-5h for qemu-devel@nongnu.org; Mon, 08 Jun 2009 12:43:47 -0400 Received: from [192.93.160.82] (port=49795 helo=LMBUniversite.thales.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDhwo-0000Lg-GM for qemu-devel@nongnu.org; Mon, 08 Jun 2009 12:43:46 -0400 Received: from jcd-laptop.localnet (unknown [192.168.10.193]) by LMBUniversite.thales.net (Postfix) with ESMTP id 8A0EF184008 for ; Mon, 8 Jun 2009 18:16:00 +0200 (CEST) From: "Jean-Christophe Dubois" To: qemu-devel@nongnu.org Date: Mon, 8 Jun 2009 18:16:05 +0200 User-Agent: KMail/1.11.2 (Linux/2.6.28-12-generic; KDE/4.2.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906081816.05953.jcd@tribudubois.net> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Greylist: delayed 1661 seconds by postgrey-1.27 at monty-python; Mon, 08 Jun 2009 12:43:46 EDT Subject: [Qemu-devel] question about qemu_malloc and friends in xxx-user/mmap.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+jcd=tribudubois.net@nongnu.org Errors-To: qemu-devel-bounces+jcd=tribudubois.net@nongnu.org Hi everybody, A little question about qemu_malloc(). There is one implementation that is heavily debated on the list. This implementation is for the main qemu part. However there are also alternative implementation in xxx-user/mmap.c files for example. These alternative implementations are not on par with the main implementation when it comes to the behavior. In particular it does not abort() on error for example. Is this perceived as a problem? Should all qemu_malloc() implementation have the same behavior (whatever is finally agreed upon on the list)? On the same kind of topic, these files do not offer some of the desired function. In particular there are no implementation of qemu_strdup() or qemu_strndud() and therefore the classical strdup() function is used in some files. Is this other issue perceived as another problem to solve? Thanks JC --Boundary-00=_kHLPKAeFOihwHFx--