7142641: -Xshared:on fails on ARM

Wed, 29 Feb 2012 12:58:49 -0500

author
dlong
date
Wed, 29 Feb 2012 12:58:49 -0500
changeset 3612
9eaf473fff9b
parent 3592
701a83c86f28
child 3613
03cb7c836ef3

7142641: -Xshared:on fails on ARM
Summary: map read-only pages MAP_PRIVATE instead of MAP_SHARED
Reviewed-by: dcubed, dholmes
Contributed-by: dean.long@oracle.com

src/os/linux/vm/os_linux.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/os/linux/vm/os_linux.cpp	Tue Feb 21 13:14:55 2012 -0500
     1.2 +++ b/src/os/linux/vm/os_linux.cpp	Wed Feb 29 12:58:49 2012 -0500
     1.3 @@ -4690,14 +4690,12 @@
     1.4                       char *addr, size_t bytes, bool read_only,
     1.5                       bool allow_exec) {
     1.6    int prot;
     1.7 -  int flags;
     1.8 +  int flags = MAP_PRIVATE;
     1.9  
    1.10    if (read_only) {
    1.11      prot = PROT_READ;
    1.12 -    flags = MAP_SHARED;
    1.13    } else {
    1.14      prot = PROT_READ | PROT_WRITE;
    1.15 -    flags = MAP_PRIVATE;
    1.16    }
    1.17  
    1.18    if (allow_exec) {

mercurial