X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-Id: <5.0.2.1.0.20020412182404.00bb4f70@pop.mail.yahoo.com> X-Sender: jlsgarrido AT pop DOT mail DOT yahoo DOT com X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Fri, 12 Apr 2002 18:31:58 -0500 To: djgpp AT delorie DOT com From: =?iso-8859-1?Q?=22Jos=E9_L=2E_S=E1nchez_Garrido=22?= Subject: Re: New DJGPP hogs memory (was: I need help) In-Reply-To: <3CB75923.C43539D5@yahoo.com> References: <5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20020410122845 DOT 00bcbbd8 AT pop DOT mail DOT yahoo DOT com> <5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20020410122845 DOT 00bcbbd8 AT pop DOT mail DOT yahoo DOT com> <5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20020411161942 DOT 00bd1eb0 AT pop DOT mail DOT yahoo DOT com> <2593-Fri12Apr2002115014+0300-eliz AT is DOT elta DOT co DOT il> <3CB6C8FA DOT 45A31BB7 AT yahoo DOT com> <3CB71962 DOT 1D21ED00 AT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk At 22:17 12/04/2002 +0000, you wrote: >Eli Zaretskii wrote: > > >... snip ... > > > > That's because you forgot a -c in "gcc -o evilalgo.o evilalgo.c", so > > evilalgo.o is actually an executable program, with all the library > > functions already linked in, not just an object file. Tanks a lot for all suggestions. Eli, I change the algorithm, and now I can't detect any difference on performance. ----test.c begins here---------------- #include #include typedef struct { char af[10]; char name[10]; } record; record **dt, *d; int main (void) { int count, c; dt=NULL; for(count=0; count<200000; count++){ if(count%1000==0){ c=count/1000; dt=(record **)realloc(dt, (c+1)*1000*sizeof(record *)); d=dt[count]; d=(record *)calloc(10, sizeof(record)); } return(0); } ----cut here---------------- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com