From dbf547ef3bf598f7089a8360355a74859549b418 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 10 May 2012 07:57:01 +0200 Subject: [PATCH 1/1] picoproj: use MAP_PRIVATE in the mmap call There is no need to allow sharing the mapped region with other processes. --- examples/picoproj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/picoproj.c b/examples/picoproj.c index 2c1b257..a44a266 100644 --- a/examples/picoproj.c +++ b/examples/picoproj.c @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) } size = st.st_size; - image = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, image_fd, 0); + image = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, image_fd, 0); if (image == NULL) { perror("mmap"); exit_code = EXIT_FAILURE; -- 2.1.4