summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schneider <wosch@FreeBSD.org>1996-02-02 05:06:29 +0000
committerWolfram Schneider <wosch@FreeBSD.org>1996-02-02 05:06:29 +0000
commit8ed714cd80d4ca3590954933e0a9f1bc546af4f8 (patch)
treeaeca7b853a4da8bbd25c5d4ec979e45b84177666
parent7c87ef470d9ae55cf85e0e58dc1e9d42d7c0f705 (diff)
Notes
-rw-r--r--lib/libc/sys/madvise.22
-rw-r--r--lib/libc/sys/mincore.22
-rw-r--r--lib/libc/sys/mmap.220
-rw-r--r--lib/libc/sys/mprotect.22
-rw-r--r--lib/libc/sys/msync.22
-rw-r--r--lib/libc/sys/munmap.22
6 files changed, 29 insertions, 1 deletions
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2
index 7319442ff616..d3b212412670 100644
--- a/lib/libc/sys/madvise.2
+++ b/lib/libc/sys/madvise.2
@@ -38,6 +38,8 @@
.Nm madvise
.Nd give advise about use of memory
.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <sys/mman.h>
.Fn madvise "caddr_t addr" "int len" "int behav"
.Sh DESCRIPTION
The
diff --git a/lib/libc/sys/mincore.2 b/lib/libc/sys/mincore.2
index 4e73c2ab90f8..bd6d9617eafa 100644
--- a/lib/libc/sys/mincore.2
+++ b/lib/libc/sys/mincore.2
@@ -38,6 +38,8 @@
.Nm mincore
.Nd get advise about use of memory
.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <sys/mman.h>
.Fn mincore "caddr_t addr" "int len" "char *vec"
.Sh DESCRIPTION
The
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index 1c0d84a85d0c..2ca868e3cff7 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -207,4 +207,22 @@ was specified and insufficient memory was available.
.Xr munmap 2 ,
.Xr mprotect 2 ,
.Xr madvise 2 ,
-.Xr mincore 2
+.Xr mincore 2 ,
+.Xr mlock 2 ,
+.Xr munlock 2
+
+.Sh BUGS
+.Ar len
+is limit to 2GB. Mmapping slightly more than 2GB doesn't work, but
+mapping a window of size (filesize % 2GB) for file sizes of slightly
+less than 2G, 4GB, 6GB and 8GB.
+
+The limit is imposed for a variety of reasons. Most of them have to do
+with FreeBSD not wanting to use 64 bit offsets in the VM system due to
+the extreme performance penalty. So FreeBSD use 32bit page indexes and
+this gives FreeBSD a maximum of 8TB filesizes. It's actually bugs in
+the filesystem code that causes the limit to be further restricted to
+1TB (loss of precision when doing blockno calculations).
+
+Another reason for the 2GB limit is that filesystem metadata can
+reside at negative offsets.
diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2
index bb2b9ad21e44..c0ad2df138c5 100644
--- a/lib/libc/sys/mprotect.2
+++ b/lib/libc/sys/mprotect.2
@@ -38,6 +38,8 @@
.Nm mprotect
.Nd control the protection of pages
.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <sys/mman.h>
.Fn mprotect "caddr_t addr" "int len" "int prot"
.Sh DESCRIPTION
The
diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2
index d976e304599e..88dd7f79fae7 100644
--- a/lib/libc/sys/msync.2
+++ b/lib/libc/sys/msync.2
@@ -38,6 +38,8 @@
.Nm msync
.Nd synchronize a mapped region
.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <sys/mman.h>
.Fn msync "caddr_t addr" "int len" "int flags"
.Sh DESCRIPTION
The
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
index b9e8a1b0841c..d62ff37455db 100644
--- a/lib/libc/sys/munmap.2
+++ b/lib/libc/sys/munmap.2
@@ -38,6 +38,8 @@
.Nm munmap
.Nd remove a mapping
.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <sys/mman.h>
.Fn munmap "caddr_t addr" "size_t len"
.Sh DESCRIPTION
The