Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/local_includes/mmap_alloc.h')
-rw-r--r--winsup/cygwin/local_includes/mmap_alloc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/winsup/cygwin/local_includes/mmap_alloc.h b/winsup/cygwin/local_includes/mmap_alloc.h
new file mode 100644
index 000000000..8d6aebcaf
--- /dev/null
+++ b/winsup/cygwin/local_includes/mmap_alloc.h
@@ -0,0 +1,17 @@
+/* The memory region used for memory maps */
+#define MMAP_STORAGE_LOW 0x001000000000L /* Leave 32 Gigs for heap. */
+/* Up to Win 8 only supporting 44 bit address space, starting with Win 8.1
+ 48 bit address space. */
+#define MMAP_STORAGE_HIGH wincap.mmap_storage_high ()
+
+class mmap_allocator
+{
+ caddr_t mmap_current_low;
+
+public:
+ mmap_allocator () : mmap_current_low ((caddr_t) MMAP_STORAGE_HIGH) {}
+
+ PVOID alloc (PVOID in_addr, SIZE_T in_size, bool fixed);
+};
+
+extern mmap_allocator mmap_alloc;