DS_ALLOC_MMAP_ARRAY(3)

EXPERIMENTAL_FUNC
ds_alloc_mmap_array - Allocate storage for an array using shared anon mmap.

SYNOPSIS
#include <karma_ds.h>

flag ds_alloc_mmap_array

(int fd, uaddr offset, uaddr size, flag writable, array_pointer *arrayp, CONST array_desc *arr_desc, flag clear, flag warn)

DESCRIPTION
Allocate storage for an array using shared anon mmap.

fd  The file descriptor to map. If this is less than zero, "/dev/zero" is mapped.

offset
    The offset from the start of the file where the array data should reside.

size
    The size of the region to map. If this is 0 the size is taken from the array size.

writable
    If the mapped pages are to be writable, this must be TRUE. If this is FALSE and the memory pages are written to, a segmentation fault occurs.

arrayp
    Information describing the shared memory region is written here.

arr_desc
    The array descriptor describing the array data. This is used to determine the amount of memory require to store the array.

clear
    If TRUE the array data is initialised to zero.

warn
    If TRUE, warning messages are displayed if there are any problems.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

NOTE
The file is mapped from its start.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/