HPlogo HP-UX Reference Volume 5 of 5 > m

mman(5)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

mman — memory mapping definitions

SYNOPSIS

#include <sys/mman.h>

DESCRIPTION

The <sys/mman.h> header defines the following symbolic constants for use with the madvise() function:

MADV_NORMAL

No further special treatment.

MADV_RANDOM

Expect random page references.

MADV_SEQUENTIAL

Expect sequential page references.

MADV_WILLNEED

Will need these pages.

MADV_DONTNEED

Will not need these pages.

MADV_SPACEAVAIL

Ensure that resources are reserved.

The following symbolic constants are defined for use with the mmap() and mprotect() functions:

PROT_READ

Region can be read.

PROT_WRITE

Region can be written.

PROT_EXEC

Region can be executed.

PROT_NONE

Region cannot be accessed.

The following symbolic constants are defined for use with the mmap() function:

MAP_FILE

Map a file.

MAP_ANONYMOUS

Map an unnamed memory region.

MAP_VARIABLE

Place region at implementation-computed address.

MAP_FIXED

Place region at specified address.

MAP_SHARED

Share changes made to mapped region.

MAP_PRIVATE

Changes to mapped region are private to a process.

The following symbolic constants are defined for use with the msync() function:

MS_SYNC

Perform synchronous writes.

MS_ASYNC

Perform asynchronous writes.

MS_INVALIDATE

Invalidate cached pages.

The following symbolic constants are defined for use with the msem_init(), msem_lock(), and msem_unlock() functions:

MSEM_LOCKED

Create semaphore in locked state.

MSEM_UNLOCKED

Create semaphore in unlocked state.

MSEM_IF_NOWAIT

Do not wait if semaphore is locked.

MSEM_IF_WAITERS

Do not unlock if semaphore has no waiters.

The typedef struct msemaphore is defined for use with the msem_init(), msem_lock(), msem_unlock(), and msem_remove() functions.

© Hewlett-Packard Development Company, L.P.