From: Antonio Ospite Date: Thu, 10 May 2012 05:57:01 +0000 (+0200) Subject: picoproj: use MAP_PRIVATE in the mmap call X-Git-Tag: v0.1.3~37^2~10 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/dbf547ef3bf598f7089a8360355a74859549b418?hp=2c663372da907c032984e0f52ed50eeb14ddfda3 picoproj: use MAP_PRIVATE in the mmap call There is no need to allow sharing the mapped region with other processes. --- 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;