X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-Id: <5.0.2.1.0.20020410122845.00bcbbd8@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: Wed, 10 Apr 2002 12:59:36 -0600 To: djgpp AT delorie DOT com From: =?iso-8859-1?Q?=22Jos=E9_L=2E_S=E1nchez_Garrido=22?= Subject: I need help Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g3AI08712773 Reply-To: djgpp AT delorie DOT com Hi all: I have a problem that I canīt understand. When download and install gcc 2.95 + djdev203, old programs originally compiled and linked with gcc 2.82 + djdev201 hoggs memory. In those programs, I use pointers to pointer of structures typedef''d previously, because I need sort and search for matches between differents structures with a common field. With gcc 2.82 + djdev201, read 118,000 structs needs about 4 MB RAM, and with gcc 2.95 + djdev203 the program exhaust the RAM (128 MB), or crashes at the sort function. At this moment, I read the FAQ, search on the Mail Archives, and I canīt resolve this problem. I use Win 98, 128 MB RAM, Tanks in advance, and excuse me for my poor english JL /*the typedef */ typedef struct { char del [3], afilia[12], folio[10], tipo[5]; int year, f_emi, count, f_nac; double sum_aseg; } sumas; void s_sum(char *s, sumas *t); /*the function s_sum splits a line of text in fields, and fills the structure *t */ sumas **l_sumas, ds; while(fgets(egreso, 199, fp)!=NULL){ s_sum(egreso, &ds); if(atoi(ds.afilia)>0){ n_sum++; l_sum=(sumas **)realloc(l_sum, n_sum*sizeof(sumas *)); l_sum[n_sum-1]=(sumas *)calloc(1, sizeof(sumas)); s_sum(egreso, l_sum[n_sum-1]); } } _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com