From: "Rafael García" Newsgroups: comp.os.msdos.djgpp Subject: heap fragmentation Date: Mon, 15 Nov 1999 18:55:18 +0100 Organization: CTV/JET Lines: 54 Message-ID: <80ph6k$t7v$1@lola.ctv.es> NNTP-Posting-Host: infon599.jet.es X-Trace: lola.ctv.es 942688276 29951 195.55.158.87 (15 Nov 1999 17:51:16 GMT) X-Complaints-To: usenet AT lola DOT ctv DOT es NNTP-Posting-Date: 15 Nov 1999 17:51:16 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I have a program that reads a file loading each line into dynamic memory with something like this: ... text[nline]=malloc(width); ... strcpy(text[nline],buf); nline++; ... during load, there may be some line that don't fix in the prepared width so after reading all the file I need to start over changing to the extended width (all lines must have max width), so I free all lines: for (n=0;n