gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] catching unitialized structures


From: Kaleb KEITHLEY
Subject: Re: [Gluster-devel] catching unitialized structures
Date: Tue, 30 Apr 2013 10:45:48 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

On 04/30/2013 10:41 AM, Jeff Darcy wrote:
On 04/30/2013 10:27 AM, Kaleb KEITHLEY wrote:

I did a quick scan of mem-pool.c but failed to notice anything
obvious. If you
happen to notice it again, it should be worth a patch.


Mem-pool does zero memory, but none of GF_CALLOC, GF_MALLOC, or
GF_REALLOC do.  For example, GF_CALLOC just calls __gf_calloc which just
calls calloc.

??

from TFM:

     The  calloc()  function allocates memory for an array of nmemb
     elements of size bytes each and returns a pointer to the allocated
     memory.   The memory  is  set  to zero.

Yes, but also from TFM:

 >The  malloc()  function  allocates  size bytes and returns a pointer
to the
 >allocated memory.  The memory is not initialized.

Yes, but both Avati and I are referring to your statement that GF_CALLOC/calloc do not zero the memory. See above.

--

Kaleb




reply via email to

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