mlockall(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

mlockall(3c)

Standard C Library Functions                                      mlockall(3C)



NAME
       mlockall, munlockall - lock or unlock address space

SYNOPSIS
       #include <sys/mman.h>

       int mlockall(int flags);


       int munlockall(void);

DESCRIPTION
       The  mlockall() function locks in memory all pages mapped by an address
       space.


       The value of flags determines whether the pages to be locked are  those
       currently mapped by the address space, those that will be mapped in the
       future, or both:

                MCL_CURRENT  Lock current mappings
                MCL_FUTURE   Lock future mappings



       If MCL_FUTURE is specified for mlockall(), mappings are locked as  they
       are added to the address space (or replace existing mappings), provided
       sufficient memory is available. Locking in this manner is  not  persis‐
       tent across the exec family of functions (see exec(2)).


       Mappings  locked  using  mlockall()  with  any option may be explicitly
       unlocked with a munlock() call (see mlock(3C)).


       The munlockall() function removes address space locks and locks on map‐
       pings in the address space.


       All  conditions  and constraints on the use of locked memory that apply
       to mlock(3C) also apply to mlockall().


       Locks established with mlockall() are not inherited by a child  process
       after a fork(2) call, and are not nested.


       mlockall()  and munlockall() have no effect when applied to shared mem‐
       ory segments created by shmget_osm(2). To lock and  unlock  these  seg‐
       ments,  the  MC_LOCK_GRANULE  and MC_UNLOCK_GRANULE interfaces of memc‐
       ntl() should be used instead.

RETURN VALUES
       Upon successful completion, the mlockall() and  munlockall()  functions
       return  0.  Otherwise,  they  return  −1  and set errno to indicate the
       error.

ERRORS
       The mlockall() and munlockall() functions will fail if:

       EAGAIN    Some or all of the memory in the address space could  not  be
                 locked  due  to  sufficient  resources.  This error condition
                 applies to mlockall() only.


       EINVAL    The flags argument contains values other than MCL_CURRENT and
                 MCL_FUTURE.


       EPERM     The  {PRIV_PROC_LOCK_MEMORY} privilege is not asserted in the
                 effective set of the calling process.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE  VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe _ Stan‐
       dardSee standards(7).


SEE ALSO
       exec(2),  fork(2),  memcntl(2),  mmap(2),  shmget_osm(2),  sysconf(3C),
       mlock(3C), plock(3C), attributes(7), standards(7)



Oracle Solaris 11.4               17 Feb 2015                     mlockall(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3