From 6d11044c633bc7aca545c5409327ef023646205b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 25 Feb 2005 21:23:15 +0000 Subject: * fhandler.h (class fhandler_base): Declare fixup_mmap_after_fork with additional flags parameter. Change offset parameter to _off64_t. (class fhandler_disk_file): Ditto. (class fhandler_dev_mem): Ditto. * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): Accomodate new parameters. * mmap.cc: Include ntdll.h. (class mmap_record): Add flags member. (mmap_record::mmap_record): Add flags parameter. (mmap_record::get_flags): New method. (class map): Add next_anon_addr member to store next anonymous mapping address suggestion. (map::get_next_anon_addr): New method. (map::set_next_anon_addr): New method. (mmap64): Don't align offset and length to granularity in case of MAP_ANONYMOUS on NT. Check for already existing mapping only on 9x. Call mmap_record::mmap_record with additional flags argument. (fhandler_base::fixup_mmap_after_fork): Accomodate new parameters. (fhandler_disk_file::mmap): Use NtMapViewOfSection with AT_ROUND_TO_PAGE flag for anonymous mappings on NT. If addr is NULL, try to map adjacent to previous mapping. (fhandler_disk_file::fixup_mmap_after_fork): Add flags argument. Change offset parameter to _off64_t. Use NtMapViewOfSection to re-create anonymous mappings on NT. (fixup_mmaps_after_fork): Accomodate new parameters when calling fhandler's fixup_mmaps_after_fork function. * ntdll.h (AT_ROUND_TO_PAGE): New define. --- winsup/cygwin/ntdll.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'winsup/cygwin/ntdll.h') diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 23ce468cd..844a131b5 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -23,6 +23,8 @@ #define WSLE_PAGE_SHARE_COUNT_MASK 0x0E0 #define WSLE_PAGE_SHAREABLE 0x100 +#define AT_ROUND_TO_PAGE 0x40000000 + typedef ULONG KAFFINITY; typedef enum _SYSTEM_INFORMATION_CLASS -- cgit v1.2.3