aboutsummaryrefslogtreecommitdiff
path: root/src/os/linux
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/linux')
-rw-r--r--src/os/linux/vm/os_linux.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
index 72f3fd07a..6a33c0e80 100644
--- a/src/os/linux/vm/os_linux.cpp
+++ b/src/os/linux/vm/os_linux.cpp
@@ -4690,14 +4690,12 @@ char* os::map_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
int prot;
- int flags;
+ int flags = MAP_PRIVATE;
if (read_only) {
prot = PROT_READ;
- flags = MAP_SHARED;
} else {
prot = PROT_READ | PROT_WRITE;
- flags = MAP_PRIVATE;
}
if (allow_exec) {