From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSGA3-0008HK-7i for qemu-devel@nongnu.org; Wed, 28 Jan 2009 14:33:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSGA0-0008GQ-Ps for qemu-devel@nongnu.org; Wed, 28 Jan 2009 14:33:17 -0500 Received: from [199.232.76.173] (port=35507 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSGA0-0008GN-JU for qemu-devel@nongnu.org; Wed, 28 Jan 2009 14:33:16 -0500 Received: from soufre.accelance.net ([213.162.48.15]:62990) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LSGA0-0001Ll-94 for qemu-devel@nongnu.org; Wed, 28 Jan 2009 14:33:16 -0500 Received: from [192.168.0.3] (potipota.net [88.168.176.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by soufre.accelance.net (Postfix) with ESMTP id 49FC5450CB for ; Wed, 28 Jan 2009 20:33:11 +0100 (CET) Subject: Re: [Qemu-devel] PATCH: qemu_mallocz(): minus one function and replace calloc() instead malloc() From: Lionel Landwerlin In-Reply-To: <200901282144.55730.pavel@pavlinux.ru> References: <200901282144.55730.pavel@pavlinux.ru> Content-Type: text/plain; charset=utf-8 Date: Wed, 28 Jan 2009 20:33:08 +0100 Message-Id: <1233171188.6716.3.camel@cocoduo.atr> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Le mercredi 28 janvier 2009 =C3=A0 21:44 +0300, Pavel Vasilyev a =C3=A9cr= it : > May be this better?=20 >=20 >=20 >=20 > --- qemu-malloc.c Base (BASE) > +++ qemu-malloc.c Locally Modified (Based On LOCAL) > @@ -46,10 +46,9 @@ > void *(size_t size) > { > void *ptr; > - ptr =3D qemu_malloc(size); > + ptr =3D calloc(1, size); > if (!ptr) > return NULL; > - memset(ptr, 0, size); > return ptr; > } > =20 This is allocation in system emulation, Malc patch's was about user emulation. --=20 =EF=BB=BFLione Landwerlin =20 =EF=BB=BF O p e n W i d e 14, rue Gaillon 75002 Paris