Unix/Linux Go Back    

NetBSD 6.1.5 - man page for mremap (netbsd section 2)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

MREMAP(2)			     BSD System Calls Manual				MREMAP(2)

     mremap -- re-map a virtual memory address

     Standard C Library (libc, -lc)

     #include <sys/mman.h>

     void *
     mremap(void *oldp, size_t oldsize, void *newp, size_t newsize, int flags);

     The mremap() function resizes the mapped range (see mmap(2)) starting at oldp and having
     size oldsize to newsize.  The following arguments can be OR'ed together in the flags argu-

     MAP_ALIGNED(n)	The allocation should be aligned to the given boundary, i.e. ensure that
			the lowest n bits of the address are zero.  The parameter n should be the
			base 2 logarithm of the desired alignment (e.g., to request alignment to
			16K, use 14 as the value for n).  The alignment must be equal to or
			greater than the platform's page size as returned by sysconf(3) with the
			_SC_PAGESIZE request.

     MAP_FIXED		newp is tried and mremap() fails if that address can't be used as new
			base address for the range.  Otherwise, oldp and newp are used as hints
			for the position, factoring in the given alignment.

     mremap() returns the new address or MAP_FAILED, if the remap failed.

     The semantics of mremap() differ from the one provided by glibc on Linux in that the newp
     argument was added and a different set of flags are implemented.

     mmap(2), munmap(2)

     The mremap() system call appeared in NetBSD 5.0.  It was based on the code that supports
     mremap() compatibility for Linux binaries.

BSD					February 14, 2008				      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 06:01 PM.