qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] PATCH: qemu_mallocz(): minus one function and replace c


From: Lionel Landwerlin
Subject: Re: [Qemu-devel] PATCH: qemu_mallocz(): minus one function and replace calloc() instead malloc()
Date: Wed, 28 Jan 2009 20:33:08 +0100

Le mercredi 28 janvier 2009 à 21:44 +0300, Pavel Vasilyev a écrit :
> May be this better? 
> 
> 
> 
> --- qemu-malloc.c Base (BASE)
> +++ qemu-malloc.c Locally Modified (Based On LOCAL)
> @@ -46,10 +46,9 @@
>  void *(size_t size)
>  {
>      void *ptr;
> -    ptr = qemu_malloc(size);
> +    ptr = calloc(1, size);
>      if (!ptr)
>          return NULL;
> -    memset(ptr, 0, size);
>      return ptr;
>  }
>  

This is allocation in system emulation, Malc patch's was about user
emulation.

-- 
Lione Landwerlin                                         

O p e n W i d e                    14, rue Gaillon 75002 Paris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]