mremap man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

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

NAME
     mremap — re-map a virtual memory address

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <sys/mman.h>

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

DESCRIPTION
     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 argument:

     MAP_ALIGNED(n)	The allocation should be aligned to the given bound‐
			ary, i.e. ensure that the lowest n bits of the address
			are zero.  The parameter n should be the base 2 loga‐
			rithm 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 plat‐
			form'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, fac‐
			toring in the given alignment.

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

COMPATIBILITY
     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.

SEE ALSO
     mmap(2), munmap(2)

HISTORY
     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
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net