Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   madvise    ( 2 )

дать совет по использованию памяти (give advice about use of memory)

  Name  |  Synopsis  |  Description  |  Return value  |    Error    |  Versions  |  Conforming to  |  Note  |  See also  |

Ошибки (Error)

EACCES advice is MADV_REMOVE, but the specified address range is
              not a shared writable mapping.

EAGAIN A kernel resource was temporarily unavailable.

EBADF The map exists, but the area maps something that isn't a file.

EINVAL addr is not page-aligned or length is negative.

EINVAL advice is not a valid.

EINVAL advice is MADV_DONTNEED or MADV_REMOVE and the specified address range includes locked, Huge TLB pages, or VM_PFNMAP pages.

EINVAL advice is MADV_MERGEABLE or MADV_UNMERGEABLE, but the kernel was not configured with CONFIG_KSM.

EINVAL advice is MADV_FREE or MADV_WIPEONFORK but the specified address range includes file, Huge TLB, MAP_SHARED, or VM_PFNMAP ranges.

EIO (for MADV_WILLNEED) Paging in this area would exceed the process's maximum resident set size.

ENOMEM (for MADV_WILLNEED) Not enough memory: paging in failed.

ENOMEM Addresses in the specified range are not currently mapped, or are outside the address space of the process.

EPERM advice is MADV_HWPOISON, but the caller does not have the CAP_SYS_ADMIN capability.