From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33154 invoked by alias); 24 Aug 2018 13:08:40 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 31117 invoked by uid 10080); 24 Aug 2018 13:08:39 -0000 Date: Fri, 24 Aug 2018 13:08:00 -0000 Message-ID: <20180824130839.31098.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Add a mmap flag (MAP_32BIT) on 64-bit platforms X-Act-Checkin: newlib-cygwin X-Git-Author: jhb X-Git-Refname: refs/heads/master X-Git-Oldrev: e6a85661cee799cd51c2afff4d6d5ec54d3e8a43 X-Git-Newrev: 472476a5a71d2490d2428d7552d501089393e884 X-SW-Source: 2018-q3/txt/msg00052.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=472476a5a71d2490d2428d7552d501089393e884 commit 472476a5a71d2490d2428d7552d501089393e884 Author: jhb Date: Mon Sep 9 18:11:59 2013 +0000 Add a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping use an address in the first 2GB of the process's address space. This flag should have the same semantics as the same flag on Linux. To facilitate this, add a new parameter to vm_map_find() that specifies an optional maximum virtual address. While here, fix several callers of vm_map_find() to use a VMFS_* constant for the findspace argument instead of TRUE and FALSE. Reviewed by: alc Approved by: re (kib) Diff: --- newlib/libc/sys/rtems/include/sys/mman.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rtems/include/sys/mman.h index 536bfd5..6c757c8 100644 --- a/newlib/libc/sys/rtems/include/sys/mman.h +++ b/newlib/libc/sys/rtems/include/sys/mman.h @@ -91,6 +91,9 @@ */ #define MAP_NOCORE 0x00020000 /* dont include these pages in a coredump */ #define MAP_PREFAULT_READ 0x00040000 /* prefault mapping for reading */ +#ifdef __LP64__ +#define MAP_32BIT 0x00080000 /* map in the low 2GB of address space */ +#endif /* * Request specific alignment (n == log2 of the desired alignment).