X-Spam-Check-By: sourceware.org Date: Thu, 8 Mar 2007 04:44:27 +0100 (CET) From: "Buzz" Subject: Re: [Testcase] Memory returned by malloc not always zeroed. References: <20070307062322 DOT GA21235 AT suncomp1 DOT spk DOT agilent DOT com> Reply-To: cygwin mailing-list Organisation: Ehm... Message-ID: User-Agent: slrn/0.9.8.1 (Win32) Hamster/2.1.0.11 KorrNews/4.2.1 To: cygwin AT cygwin DOT com In-Reply-To: <20070307062322.GA21235@suncomp1.spk.agilent.com> Lines: 22 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Op Tue, 6 Mar 2007 22:23:22 -0800 schreef Gary Johnson in <20070307062322.GA21235 AT suncomp1.spk.agilent.com>: : On 2007-03-07, Buzz wrote: [...] : > This indicates malloc returning non-zeroed memory. : > : > Has anybody got a clue as to what's going on? : : Malloc() returns a pointer to a block of memory. Other than size : and alignment, the contents of that memory is not specified. If you : want a block of memory initialized to zero, use calloc(). You're right, of course. Excuse the noise. L8r, Buzz. -- ) | | ---/ ---/ Yes, this | This message consists of true | I do not -- | | / / really is | and false bits entirely. | mail for ) | | / / a 72 by 4 +-------------------------------+ any1 but -- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as." | me. 4^re -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/