.\" -*- nroff -*- .\" .\" copyright (C) 1997 Stephen Williams .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .TH skel 9 "$Date:$" "Linux DDI" "VM Functions" .\" .\" Turn off hyphenation and right justification for the first sections. .hlm 0 .na .\" The name should be formatted this way for apropos to work .SH NAME mem_map_reserve, mem_map_unreserve \- Manipulate flags of virtual memory pages. .\" .\" .SH SYNOPSIS .B #include .br .B #include .sp .BI "#define mem_map_reserve(" page_nr ")" .br .BI "#define mem_map_unreserve(" page_nr ")" .HP .\" .\" Turn hyphenation and adjustment back on. .hlm 1 .ad .SH DESCRIPTION These macros cause a page to become reserved/unreserved. A reserved page is reserved from any further consideration by the linux kernel, meaning it is not scanned as potentially pageable, or available for page allocation. The kernel treats reserved pages as memory-mapped hardware. .PP It makes sense for a driver to mark a page reserved, for example, if the driver supports .BR mmap "(2)" with dynamically allocated pages that the target device can access via DMA. .SH "RETURN VALUE" None .SH AVAILABILITY Linux 2.0+ .SH "SEE ALSO" .hlm 0 .na .BR MAP_NR "(9), " get_free_pages "(9), " mmap "(2)" .ad .hlm 1 .SH AUTHOR Stephen Williams .SH BUGS If a page is marked reserved, a call to .BR free_page "(9)" will silenty ignore it. If the page was originally allocated by get_free_page, you must remember to unmark the page before releasing it to the system. Otherwise, the page is lost.