diff --git a/lib/libcuse/cuse.3 b/lib/libcuse/cuse.3 index 0aff43ac2155..52f9ca4d225a 100644 --- a/lib/libcuse/cuse.3 +++ b/lib/libcuse/cuse.3 @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.\" Copyright (c) 2010-2013 Hans Petter Selasky +.\" Copyright (c) 2010-2022 Hans Petter Selasky .\" .\" All rights reserved. .\" @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 17, 2019 +.Dd July 18, 2022 .Dt CUSE 3 .Os .Sh NAME @@ -124,6 +124,11 @@ mapped by This function returns a valid data pointer on success or .Dv NULL on failure. +The returned pointer is always aligned to the system page size. +The number and size of allocations is limited by the +.Xr mmap 2 +offset having to fit into a 32-bit variable typically for 32-bit +applications. .Pp .Ft "int" .Fn "cuse_is_vmalloc_addr" "void *" @@ -137,16 +142,12 @@ Else this function returns zero. This function frees memory allocated by .Fn cuse_vmalloc . This function is NULL safe. -Note that the -cuse library will internally not free the memory until the -.Fn cuse_uninit -function is called and that the number of unique -allocations is limited. .Pp .Ft "unsigned long" .Fn "cuse_vmoffset" "void *" -This function returns the mmap offset that the client must use to +This function returns the mmap offset the client must use to access the allocated memory. +The passed pointer must be aligned to the system page size. .Pp .Ft "struct cuse_dev *" .Fn "cuse_dev_create" "const struct cuse_methods *mtod" "void *priv0" "void *priv1" "uid_t" "gid_t" "int permission" "const char *fmt" "..."