On Jan  8 18:03, Ken Brown wrote:
> From 87e07edb7c53f425c86579d013d29efd3f905203 Mon Sep 17 00:00:00 2001
> From: Ken Brown <kbr...@cornell.edu>
> Date: Fri, 20 Dec 2024 13:11:22 -0500
> Subject: [PATCH 3/5] Cygwin: mmap: remove __PROT_FILLER and the associated
>  methods
> 
> This is left over from 32 bit Cygwin and is no longer used.
> 
> Signed-off-by: Ken Brown <kbr...@cornell.edu>
> ---
>  winsup/cygwin/mm/mmap.cc | 31 +++++++------------------------
>  1 file changed, 7 insertions(+), 24 deletions(-)
> 
> diff --git a/winsup/cygwin/mm/mmap.cc b/winsup/cygwin/mm/mmap.cc
> index 13e64c23256c..9e6415de9951 100644
> --- a/winsup/cygwin/mm/mmap.cc
> +++ b/winsup/cygwin/mm/mmap.cc
> @@ -27,14 +27,8 @@ details. */
>     is to support mappings longer than the file, without the file growing
>     to mapping length (POSIX semantics). */
>  #define __PROT_ATTACH   0x8000000
> -/* Filler pages are the pages from the last file backed page to the next
> -   64K boundary.  These pages are created as anonymous pages, but with
> -   the same page protection as the file's pages, since POSIX applications
> -   expect to be able to access this part the same way as the file pages. */
> -#define __PROT_FILLER   0x4000000
> -
> -/* Stick with 4K pages for bookkeeping, otherwise we just get confused
> -   when trying to do file mappings with trailing filler pages correctly. */
> +
> +/* Stick with 4K pages for bookkeeping. */
>  #define PAGE_CNT(bytes) howmany((bytes), wincap.page_size())

LGTM.

Given we don't do filler pages because Windows doesn't let us anyway, we
could switch to 64K allocation_granularity() bookkeeping now, too.


Thanks,
Corinna

Reply via email to