summaryrefslogtreecommitdiff
path: root/databases/mysql80-server/files/patch-storage_myisam_mi__dynrec.cc
blob: 06a757ebb8944a6dbda3237cd2f9f627df04cae2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- storage/myisam/mi_dynrec.cc.orig	2019-09-20 08:30:51 UTC
+++ storage/myisam/mi_dynrec.cc
@@ -83,17 +83,12 @@ bool mi_dynmap_file(MI_INFO *info, my_off_t size) {
     return 1;
   }
   /*
-    I wonder if it is good to use MAP_NORESERVE. From the Linux man page:
-    MAP_NORESERVE
-      Do not reserve swap space for this mapping. When swap space is
-      reserved, one has the guarantee that it is possible to modify the
-      mapping. When swap space is not reserved one might get SIGSEGV
-      upon a write if no physical memory is available.
+    MAP_NORESERVE is unimplemented in FreeBSD
   */
   info->s->file_map = (uchar *)my_mmap(
       0, (size_t)size,
       info->s->mode == O_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE,
-      MAP_SHARED | MAP_NORESERVE, info->dfile, 0L);
+      MAP_SHARED, info->dfile, 0L);
   if (info->s->file_map == (uchar *)MAP_FAILED) {
     info->s->file_map = NULL;
     return 1;