From: dcasale AT my-deja DOT com Newsgroups: comp.os.msdos.djgpp Subject: Where is malloc info kept? Date: Wed, 15 Nov 2000 19:04:22 GMT Organization: Deja.com - Before you buy. Lines: 31 Message-ID: <8uumng$kq5$1@nnrp1.deja.com> NNTP-Posting-Host: 199.249.234.30 X-Article-Creation-Date: Wed Nov 15 19:04:22 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) X-Http-Proxy: 1.1 x69.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 It's me again, still plugging away at trying to debug my compression program. What's annoying is that I can run it on a small file set and it works perfectly, but on a large file set it faults on a delete. I'm wondering. Where is the malloc info kept for each allocation? Is it in the bytes immediately prior to the returned pointer? Somewhere else entirely? YAMD seems to like my small, sample file set. I get no allocation errors and only a few memory leaks from three fopen's and a printf (which I assume are supposed to be there -- 3 32 byte allocations and a 16384 byte allocation, respectively). But before it finishes on my large file set and gets to the point where the fault on the delete happens, it has a failed malloc. According to both _go32_dpmi_remaining_virtual_memory _and_ _go32_dpmi_remaining_physical_memory, I've got plenty of space before any allocations should fail. So what gives? Could this be a case of memory corruption on my part, a buggy DPMI server...what? Any ideas? Damon Casale, damon AT WRONG DOT redshift DOT com (remove the obvious) "Maybe you have amnesia, brought on by...shock." "Maybe. I don't know, I can't remember." -- Grace and the Doctor, Fox Movie Sent via Deja.com http://www.deja.com/ Before you buy.