This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: mmap on 4k boundaries
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: "Cygwin-Developers at Cygwin dot Com" <cygwin-developers at cygwin dot com>
- Date: Tue, 8 Jul 2003 12:23:23 +0200
- Subject: Re: mmap on 4k boundaries
- References: <ICEBIHGCEJIPLNMBNCMKCEHJCIAA.chris@atomice.net>
- Reply-to: cygwin-developers at cygwin dot com
On Tue, Jul 08, 2003 at 10:16:37AM +0100, Chris January wrote:
> I can't make a patch for this at the moment, but FYI you can map a section
> on a 4k page bounday using the AT_ROUND_TO_PAGE flag. So on Windows NT, mmap
> should be able to map on a 4k page boundary using this function.
> [...]
> ZwMapViewOfSection(
> IN HANDLE SectionHandle,
> IN HANDLE ProcessHandle,
> IN OUT PVOID *BaseAddress,
> IN ULONG ZeroBits,
> IN ULONG CommitSize,
> IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
> IN OUT PULONG ViewSize,
> IN SECTION_INHERIT InheritDisposition,
> IN ULONG AllocationType,
> IN ULONG Protect
> );
Cool. You'll probbaly also need ZwCreateSection to get the SECTION_EXTEND
flag but that won't hurt. Reading the description, I'm inclined to
believe that the AT_EXENDABLE_FILE flag also allows maps bigger than the
file size as on POSIX systems. Now I'd just need time to investigate...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.