This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mmap on 4k boundaries


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]