X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C6CC93C.6F9E05E6@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: Malloc/free DJGPP code References: <3C6C735D DOT A6D16719 AT yahoo DOT com> <1225-Fri15Feb2002084500+0200-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 50 Date: Fri, 15 Feb 2002 08:40:10 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 1013762410 12.90.167.174 (Fri, 15 Feb 2002 08:40:10 GMT) NNTP-Posting-Date: Fri, 15 Feb 2002 08:40:10 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > > > From: CBFalconer > > Newsgroups: comp.os.msdos.djgpp > > Date: Fri, 15 Feb 2002 03:09:18 GMT > > > > > > > I changed the output strings to terminate in \r\n, and now I get > > > > bright patches of blue on the screen, with no output! > > > > > > Does your program call some conio functions to set the screen colors? If > > > not, you should have see the normal white on black output from cprintf. > > > > > > Can you show the fragment which calls cprintf? > > > > These are the only locations enabled (with DEBUG1). I took the > > \r's out again so it doesn't destroy the screen now. > > I don't see anything wrong with the code you posted. Does it help to > put > > textbackground (BLACK); > textcolor (LIGHTGRAY); > > before the cprintf? I have tried some more experiments. Changing the EOL sequence to \n\r in place of \r\n produces a gray screen instead of purple! Still no other visible output, and the program doesn't exit until I hit (for both \r\n and \n\r). I then installed a static "static int firstime" in malloc, and guarded the cprintfs with "if (firstime)" with code to "firstime = 1" on malloc exit. NO CHANGE - it was ignored. I suspect the first malloc call is made before the global arena is setup. Removing the \r's resulted in visible output, but without any returns, and the output from the first sbrk call area still appeared, so firstime was apparently not zeroed yet! This is annoying. If other things aren't set up, I am very leery of calling anything whatsoever at this point. Who knows what is getting written on. -- 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)