X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C657854.2EB4A737@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Alignment problem References: <3c63f21f DOT sandmann AT clio DOT rice DOT edu> <3C645F1D DOT C26E8F64 AT yahoo DOT com> <3c64b7cf DOT sandmann AT clio DOT rice DOT edu> <3C650C18 DOT B45F67D4 AT yahoo DOT com> <4331-Sat09Feb2002145741+0200-eliz AT is DOT elta DOT co DOT il> <3C655E12 DOT 6F8D351E AT yahoo DOT com> <200202091859 DOT g19Ixam19704 AT envy DOT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 40 Date: Sat, 09 Feb 2002 19:35:02 GMT NNTP-Posting-Host: 12.90.167.174 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1013283302 12.90.167.174 (Sat, 09 Feb 2002 19:35:02 GMT) NNTP-Posting-Date: Sat, 09 Feb 2002 19:35:02 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com DJ Delorie wrote: > > > Those sources ARE in djlsr203.zip, I assume. No problem getting > > the time up there - see paste below. I assume this can be done > > without recompiling the run-time? > > Yes. Just add malloc.c (malloc.o) to your local project. > > > I can well imaging that the cure could be to simply mark areas free > > and join them only to immediately adjacent free areas, leaving any > > further compaction to malloc only when and if needed. > > Malloc does not do any fancy compaction. I wasn't claiming that it did - just that it could be a way of postponing compaction until needed and increasing the efficiency. > > > I assume that malloc/free work on some master pool until more is > > needed. > > Yes. > > > So there is some intimate knowledge of the malloc algorithm built > > into the compiler, > > No, this cannot be. Perhaps gcc knows about malloc in general, but it > cannot know about the malloc algorithm. OK, I just checked again. I had been confused by the unlinked value in the .o disassembly, and it is calling malloc for each occurance. By looking in the linked .exe file the unlinked value no longer creates confusion. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net) Available for consulting/temporary embedded and systems. (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce AT ftc DOT gov (for spambots to harvest)