Index of Section 3 Manual Pages

Interix / SUAmadvise.3Interix / SUA

madvise(3)                                                   madvise(3)

  madvise()

  NAME

    madvise() - give advice about use of memory

  SYNOPSIS

    #include 
    #include 
    int madvise (void *addr, size_t len, int behav)

  DESCRIPTION

    The madvise(3) system call allows a process that has knowledge of its
    memory behavior to describe it to the system. The addr argument specifies
    the address of the first byte of the block of memory being described, and
    the len argument specifies the number of bytes in the block. The behav
    argument must be set to one of the following behaviors:

    MADV_NORMAL
        No further special treatment needed.

    MADV_RANDOM
        Expect random page references.

    MADV_SEQUENTIAL
        Expect sequential page references.

    MADV_WILLNEED
        The pages will be referenced soon.

    MADV_DONTNEED
        The pages will not be referenced soon.

  RETURN VALUES

    This function returns 0 if successful; otherwise it returns -1 and sets
    errnoi to indicate the error.

  ERRORS

    This function can fail for the following reason:

    [EINVAL]
        The addr and len arguments specify an invalid address range.

  SEE ALSO

    msync(3)

    munmap(2)

  USAGE NOTES

    The madvise function is thread safe.

    The madvise function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA