Opened 13 years ago

Closed 13 years ago

#3571 closed Bugs (wontfix)

mapped_file_source, reopening fails with exception (Windows XP)

Reported by: xurux1-mail@… Owned by: Jonathan Turkanis
Milestone: Boost 1.41.0 Component: iostreams
Version: Boost 1.40.0 Severity: Problem
Keywords: mapped_file Cc:

Description

i can confirm the bug described in this message:

http://article.gmane.org/gmane.comp.lib.boost.user/23583

i.e. the reopening of the mapped_file_source fails with std::exception, what() = "failed mapping view: access denied" is thrown.

(here: Windows xp / Mingw gcc 4.2.1 / boost 1.40.0)

Attachments (1)

mmap1.cpp (1.2 KB ) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (3)

by anonymous, 13 years ago

Attachment: mmap1.cpp added

comment:1 by anonymous, 13 years ago

update:

Creating a new instance of mapped_file_source (instead of .open after .close), this works!

(so, is it a bug?)

comment:2 by anonymous, 13 years ago

Resolution: wontfix
Status: newclosed

sorry, it's not a bug.

a) you cannot map beyond the end of the file (obvious)

b) (on windows), apparently you can not map with offset to the last 64k of the file, if they are not completely filled (file ends before complete 64k are filled).

so, b was the problem (file was between 64k and 128k large).

Note: See TracTickets for help on using tickets.