X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C679916.8915C74F@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: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 66 Date: Mon, 11 Feb 2002 10:25:21 GMT NNTP-Posting-Host: 12.90.167.59 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1013423121 12.90.167.59 (Mon, 11 Feb 2002 10:25:21 GMT) NNTP-Posting-Date: Mon, 11 Feb 2002 10:25:21 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: > > On Mon, 11 Feb 2002, CBFalconer wrote: > > > > [1] c:\c\hashlib>*gcc -c -pg -a -O2 -W -Wall -gstabs+ malloc.c > > > > > > [1] c:\c\hashlib>gcc -pg -a -o hshtestp hashtest.o cokusMT.o hashlib.o malloc.o > > > > > > [1] c:\c\hashlib>timerun hshtestp 4 10000 > > > Timer 3 on: 22:39:40 > > > > > > Your program caused a divide overflow error. > > > If the problem persists, contact your program vendor. > > What version of GCC is this? > > > dwpmi also shows up, but this is probably an effect, not a cause. > > Sorry, I don't understand this comment. What DPMI functions appeared > hight in the profile, and why do you think it's an effect of something? > > Perhaps simply post the flat profile part (the first part of Gprof's > output), in case there are some hints there that you overlooked. > > > Now what? > > Try invoking Gprof with the --line option, it might tell more about the > parts of `free' that take most of the running time. > > > > Timer 3 off: 22:42:17 Elapsed: 0:00:02.80 > > Is this 2.8 seconds elapsed? If so, it might be too short for a > meaningful profile, especially if you succeed in getting line by line > information. Can you modify your program so that it runs longer, by > either enlarging the amount of allocated objects, or even by simply > running the same code in `main' in a loop? gcc 2.953. Lots of time, see below. At least until I can get a detailed look inside free. I suspect free is talking back to the dpmi memory manager. As I said, an effect, not a cause. The -l option just puts markers on entrance/exit from free. That's why I think I need the -a compile option, which results in a zero-divide. Flat profile: Each sample counts as 0.0555556 seconds. % cumulative self self total time seconds seconds calls ns/call ns/call name 60.00 1.17 1.17 10013 116515.20 116515.20 free 22.86 1.61 0.44 __dpmi_int 2.86 1.67 0.06 10064 5520.23 5520.23 malloc 2.86 1.72 0.06 inserted 2.86 1.78 0.06 mcount 2.86 1.83 0.06 putintbl 2.86 1.89 0.06 reloadMT 2.86 1.94 0.06 t1hash That 2.8 secs includes program load, screen output, etc. -- 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)