delorie.com/archives/browse.cgi | search |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: page fault and prob. w/ free() |
Date: | Wed, 02 Feb 2000 21:23:22 +0200 |
Organization: | NetVision Israel |
Lines: | 27 |
Message-ID: | <3898842A.472BF851@is.elta.co.il> |
References: | <879l3i$m61$1 AT news DOT d DOT umn DOT edu> |
NNTP-Posting-Host: | ras1-p65.rvt.netvision.net.il |
Mime-Version: | 1.0 |
X-Trace: | news.netvision.net.il 949519420 23906 62.0.172.67 (2 Feb 2000 19:23:40 GMT) |
X-Complaints-To: | abuse AT netvision DOT net DOT il |
NNTP-Posting-Date: | 2 Feb 2000 19:23:40 GMT |
X-Mailer: | Mozilla 4.7 [en] (Win98; I) |
X-Accept-Language: | en,ru,hebrew |
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 No, a Page Fault has nothing to do with the cache. Take a look at section 12.2 of the DJGPP FAQ list (v2/faq230b.zip from the usual DJGPP sites), it explains what a Page Fault is. > so I am not sure how I'm causing > it but the offending line of code is... > free(data_buffer); > > where data_buffer has been declared as follows... > unsigned char *data_buffer; > > and allocated memory using malloc() before free is called. Crashes inside `free' are usually a sign of code that overruns (writes beyond the end of) allocated buffers. Section 9.2 of the FAQ has more about this issue; please read it. > > any suggestions of why free() wouldn't be working? > > thanks, > Darren
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |