Mail Archives: cygwin/2006/07/13/14:53:01
---559023410-73223205-1152816765=:3316
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 13 Jul 2006, Brian Ford wrote:
> On Thu, 13 Jul 2006, Corinna Vinschen wrote:
> > I added an (hopefully) appropriate patch, which commits a page within a
> > MAP_NORESERVE area when memory in this page is accessed by the
> > application. If commiting the memory fails, SIGBUS is generated. Please
> > test CVS HEAD or the next developer snapshot from
> > http://cygwin.com/snapshots/
>
> Wow! Thanks. Given my limited Windows API knowledge, that sounded
> difficult to accomplish properly. I'll test it for you shortly.
One problem found. If the memory is not touched before using it as a
buffer to a read call, the read returns -1 with errno set to ISDIR. STC
attached.
Thanks again for looking at this.
--
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...
.
---559023410-73223205-1152816765=:3316
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="mmaptest.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT CYG DOT 4 DOT 58 DOT 0607131352450 DOT 3316 AT PC1163-8460-XP DOT flightsafety DOT com>
Content-Description:
Content-Disposition: attachment; filename="mmaptest.c"
I2luY2x1ZGUgPHN5cy9tbWFuLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+
DQojaW5jbHVkZSA8c3lzL3N0YXQuaD4NCiNpbmNsdWRlIDxmY250bC5oPg0K
I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8dW5pc3RkLmg+DQojaW5j
bHVkZSA8c3RyaW5nLmg+DQoNCg0KaW50DQptYWluKGludCBhcmdjLCBjaGFy
ICogYXJndltdKQ0Kew0KICAgIGludCAgIHZpcnRfc2l6ZSwgZmQ7DQogICAg
dm9pZCAqYWRkcjsNCg0KICAgIGFkZHIgICAgICA9IE5VTEw7DQogICAgdmly
dF9zaXplID0gMHgxODAwMDAwMDsNCiAgICBhZGRyID0gbW1hcChhZGRyLCB2
aXJ0X3NpemUsIChQUk9UX1JFQUR8UFJPVF9XUklURSksDQoJCShNQVBfTk9S
RVNFUlZFfE1BUF9QUklWQVRFfE1BUF9BTk9OKSwgLTEsIDApOw0KICAgIGlm
IChhZGRyID09IE1BUF9GQUlMRUQpDQogICAgew0KCXBlcnJvcigibWFwcGlu
ZyBWTSBzY3JhdGNoIHNwYWNlIik7DQoJcmV0dXJuIC0xOw0KICAgIH0NCg0K
ICAgIGZkID0gb3BlbigiL3Byb2Mvc2VsZi9leGUiLCBPX1JET05MWSk7DQog
ICAgaWYgKGZkIDwgMCkNCiAgICB7DQoJcGVycm9yKCJvcGVuIHNlbGYiKTsN
CglyZXR1cm4gLTE7DQogICAgfQ0KDQojaWZkZWYgUFJFX1RPVUNIDQogICAg
bWVtc2V0KGFkZHIsIC0xLCBzeXNjb25mKF9TQ19QQUdFU0laRSkpOw0KI2Vu
ZGlmDQoNCiAgICBpZiAocmVhZChmZCwgYWRkciwgc3lzY29uZihfU0NfUEFH
RVNJWkUpKSA8IDApDQogICAgew0KCXBlcnJvcigicmVhZCIpOw0KCWNsb3Nl
KGZkKTsNCglyZXR1cm4gLTE7DQogICAgfQ0KDQogICAgY2xvc2UoZmQpOw0K
DQogICAgcmV0dXJuIDA7DQp9DQo=
---559023410-73223205-1152816765=:3316
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
---559023410-73223205-1152816765=:3316--
- Raw text -