From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: page fault and prob. w/ free() Date: 2 Feb 2000 19:07:02 GMT Organization: Aachen University of Technology (RWTH) Lines: 19 Message-ID: <879v8m$bvc$1@nets3.rz.RWTH-Aachen.DE> References: <879l3i$m61$1 AT news DOT d DOT umn DOT edu> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 949518422 12268 137.226.32.75 (2 Feb 2000 19:07:02 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 2 Feb 2000 19:07:02 GMT User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (Linux/2.0.0 (i586)) Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com deisenzi AT d DOT umn DOT edu wrote: > I am causing a run-time error in the form of a page fault. I thought > a page fault was a miss on the cache Nah, it's a lot more serious than that. You missed not the cache, but the addressable range of memory for that process. You fell into a hole in the middle of address space (an 'unmapped page'). > free(data_buffer); free() calls killing the application with a page fault almost always mean that you've overwritten memory outside the bounds of some block you allocated (array index over-run, or under-run), corrupting malloc()'s internal book-keeping data. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.