From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3899 invoked by alias); 27 Dec 2004 17:38:10 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 3757 invoked from network); 27 Dec 2004 17:37:58 -0000 Received: from unknown (HELO masquerade.micron.com) (137.201.242.130) by sourceware.org with SMTP; 27 Dec 2004 17:37:58 -0000 Received: from mail-srv1.micron.com (localhost [127.0.0.1]) by masquerade.micron.com (8.12.9/8.12.2) with ESMTP id iBRHbu8D027376 for ; Mon, 27 Dec 2004 10:37:57 -0700 (MST) Received: from ntxboimbx07.micron.com (ntxboimbx07.micron.com [137.201.80.94]) by mail-srv1.micron.com (8.12.9/8.12.2) with ESMTP id iBRHbstC027368; Mon, 27 Dec 2004 10:37:55 -0700 (MST) From: lrtaylor@micron.com content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: malloc and free Date: Mon, 27 Dec 2004 17:38:00 -0000 Message-ID: <363801FFD7B74240A329CEC3F7FE4CC4030965C0@ntxboimbx07.micron.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: To: , X-SW-Source: 2004-12/txt/msg00234.txt.bz2 It's probably a bug in your routine. However, without seeing your code, it's hard to give any good answers. Step through it with a debugger and make sure that you're not trying to free the same memory more than once, or access memory that hasn't been allocated yet. Good luck, Lyle=20 -----Original Message----- From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On Behalf Of Ankit Jain Sent: Friday, December 24, 2004 11:41 AM To: gcc Subject: malloc and free hi routine xyz uses malloc and free functions. it gives accurate and correct result if called once.=20 but if the function is called in a loop N number of times then probably it gives segmentation fault. what is the reason? can any body guess or test code is needed? thanks ankit jain ________________________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping"=20 your friends today! Download Messenger Now=20 http://uk.messenger.yahoo.com/download/index.html