Loading...
Searching...
No Matches
sasmsync.h File Reference

API to manage the resources of the Shared Address Space. More...

Go to the source code of this file.

## Macros

#define | SAS_ASYNC 1
| SAS msync asynchronous option.
#define | SAS_SYNC 0
| SAS msync synchronous option.
#define | __C__
| ignore this macro behind the curtain

## Functions

__C__ int | sasMsyncPurge (void *startAddr, size_t size, int asyncBool)
| Write a range of pages to persistent storage and inform the kernel that those pages can be removed from real memory.
__C__ int | sasMsyncRelease (void *startAddr, size_t size)
| Inform the kernel that those pages can be removed from real memory.
__C__ int | sasMsyncBring (void *startAddr, size_t size)
| Inform the kernel that those pages will be needed soon.
__C__ int | sasMsyncSequential (void *startAddr, size_t size)
| Inform the kernel that those pages will be needed soon and will be accessed in sequential order.
__C__ int | sasMsyncRandom (void *startAddr, size_t size)
| Inform the kernel that those pages will be needed soon and will be accessed in random order.
__C__ int | sasMsyncWrite (void *startAddr, size_t size, int asyncBool)
| Write a range of pages to persistent storage.

## Detailed Description

API to manage the resources of the Shared Address Space.

!

Manage the real memory and persistent state of the backing files associated with the SAS Region.

## Function Documentation

## sasMsyncBring()

__C__ int sasMsyncBring | ( | void * | startAddr,
|  | size_t | size )

extern

Inform the kernel that those pages will be needed soon.

Mark all pages in range MADV_WILLNEED.

    @param startAddr starting address of the purge range.
    @param size of the purge range.
    @return Zero on success and ERRNO otherwise.

## sasMsyncPurge()

__C__ int sasMsyncPurge | ( | void * | startAddr,
|  | size_t | size,
|  | int | asyncBool )

extern

Write a range of pages to persistent storage and inform the kernel that those pages can be removed from real memory.

Write (msync) any changed pages in range then mark all pages in range MADV_DONTNEED.

    @param startAddr starting address of the purge range.
    @param size of the purge range.
    @param asyncBool Flag for asynchronous action if true.
    @return Zero on success and ERRNO otherwise.

## sasMsyncRandom()

__C__ int sasMsyncRandom | ( | void * | startAddr,
|  | size_t | size )

extern

Inform the kernel that those pages will be needed soon and will be accessed in random order.

Mark all pages in range MADV_RANDOM.

    @param startAddr starting address of the purge range.
    @param size of the purge range.
    @return Zero on success and ERRNO otherwise.

## sasMsyncRelease()

__C__ int sasMsyncRelease | ( | void * | startAddr,
|  | size_t | size )

extern

Inform the kernel that those pages can be removed from real memory.

Mark all pages in range MADV_DONTNEED.

    @param startAddr starting address of the purge range.
    @param size of the purge range.
    @return Zero on success and ERRNO otherwise.

## sasMsyncSequential()

__C__ int sasMsyncSequential | ( | void * | startAddr,
|  | size_t | size )

extern

Inform the kernel that those pages will be needed soon and will be accessed in sequential order.

Mark all pages in range MADV_SEQUENTIAL.

    @param startAddr starting address of the purge range.
    @param size of the purge range.
    @return Zero on success and ERRNO otherwise.

## sasMsyncWrite()

__C__ int sasMsyncWrite | ( | void * | startAddr,
|  | size_t | size,
|  | int | asyncBool )

extern

Write a range of pages to persistent storage.

Write (msync) any changed pages in range.

    @param startAddr starting address of the purge range.
    @param size of the purge range.
    @param asyncBool Flag for asynchronous action if true.
    @return Zero on success and ERRNO otherwise.