delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/13/16:45:28

From: dcasale AT my-deja DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: My program hangs under RHIDE's debugger
Date: Mon, 13 Nov 2000 21:22:50 GMT
Organization: Deja.com - Before you buy.
Lines: 68
Message-ID: <8upm2v$i0q$1@nnrp1.deja.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1001109084112 DOT 16891F-100000 AT is> <8ueodf$5ep$1 AT nnrp1 DOT deja DOT com> <9743-Thu09Nov2000224218+0200-eliz AT is DOT elta DOT co DOT il> <8ufgue$reg$1 AT nnrp1 DOT deja DOT com> <9003-Fri10Nov2000120410+0200-eliz AT is DOT elta DOT co DOT il> <8uho2n$kr9$1 AT nnrp1 DOT deja DOT com> <2427-Sat11Nov2000013157+0200-eliz AT is DOT elta DOT co DOT il> <8ui4h7$vac$1 AT nnrp1 DOT deja DOT com> <83wvebclth DOT fsf AT mercury DOT st DOT hmc DOT edu>
NNTP-Posting-Host: 199.249.234.30
X-Article-Creation-Date: Mon Nov 13 21:22:50 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
X-Http-Proxy: 1.1 x52.deja.com:80 (Squid/1.1.22) for client 199.249.234.30
X-MyDeja-Info: XMYDJUIDdcasale
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <83wvebclth DOT fsf AT mercury DOT st DOT hmc DOT edu>,
  Nate Eldredge <neldredge AT hmc DOT edu> wrote:
> dcasale AT my-deja DOT com writes:
>
> > In article <2427-Sat11Nov2000013157+0200-eliz AT is DOT elta DOT co DOT il>,
> >   djgpp AT delorie DOT com wrote:
> > > > From: dcasale AT my-deja DOT com
> > > > Newsgroups: comp.os.msdos.djgpp
> > > > Date: Fri, 10 Nov 2000 21:07:40 GMT
> > > >
> > > > Here's an update on the situation, though.  I was able to get my
> > > > compression program working with Nate Eldredge's YAMD (Yet
> > > > Another Malloc Debugger).  My program has a loop which
> > > > allocates some bytes, allocates some more bytes, then
> > > > deallocates both.  The loop executes without any trouble
> > > > several times, then fails on an allocation.
> > >
> > > What do you mean by ``fails''?  Did it crash with a Page Fault?
> > > If so, the place where it crashed is the code which overwrites an
> > > allocated buffer, and you should look closely at the code which
> > > crashed.
> >
> > No, I mean the allocation failed _but the program continued_.  The
> > crash happened slightly later.
> >
> > Here's what YAMD's log file says:
> >
> > INFO: Failed allocation
> > Failed to malloc 12 bytes (aligned to 1) at
> > 	new1.cc:0(___builtin_new+28)  0x02c538
> > 	new2.cc:0(___builtin_vec_new+19)  0x02d70f
> > 	det.cpp:104(_SetLongPath__4CDETPCUw+212)  0x007b18
> > 	dirdisk.cpp:849
> > ...
> >
> > INFO: Failed allocation
> > Failed to malloc 4 bytes (aligned to 1) at
> > 	exception.cc:0(___eh_alloc+18)  0x02d19e
> > 	new1.cc:0(___builtin_new+65)  0x02c55d
> > 	new2.cc:0(___builtin_vec_new+19)  0x02d70f
> > 	det.cpp:104(_SetLongPath__4CDETPCUw+212)  0x007b18
> > 	dirdisk.cpp:849
> > ...
> >
> > Why did the malloc suddenly fail when there was memory still
> > available?  12 bytes and 40 bytes had been freed previous to these
> > two failed allocations.
>
> Yes, but YAMD doesn't actually free memory.  It keeps the block
> around, so it can see if you try to access it later (which would be an
> error).  So you do need quite a lot of memory (or swap) to use YAMD on
> a program of any size.  The README explains this.

Actually, the README doesn't explain this.  It only states that one
needs a lot of virtual memory to use YAMD.  Thanks for explaining why.

Now I have to figure out why, when I increased virtual memory from
128MB to 256MB to 512MB to 1024MB, it only made a difference when I
went from 128MB to 256MB, and not at all thereafter.  *shrugs*

Looks like it's a job for _go32_remaining_virtual_memory...

Damon Casale, damon AT WRONG DOT redshift DOT com
Go go Gadget debugger!


Sent via Deja.com http://www.deja.com/
Before you buy.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019