mprotect.2 (13836) | mprotect.2 (14326) |
---|---|
1.\" Copyright (c) 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 26 unchanged lines hidden (view full) --- 35.Dt MPROTECT 2 36.Os 37.Sh NAME 38.Nm mprotect 39.Nd control the protection of pages 40.Sh SYNOPSIS 41.Fd #include <sys/types.h> 42.Fd #include <sys/mman.h> | 1.\" Copyright (c) 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 26 unchanged lines hidden (view full) --- 35.Dt MPROTECT 2 36.Os 37.Sh NAME 38.Nm mprotect 39.Nd control the protection of pages 40.Sh SYNOPSIS 41.Fd #include <sys/types.h> 42.Fd #include <sys/mman.h> |
43.Fn mprotect "caddr_t addr" "int len" "int prot" | 43.Fn mprotect "caddr_t addr" "size_t len" "int prot" |
44.Sh DESCRIPTION 45The 46.Fn mprotect 47system call 48changes the specified pages to have protection 49.Fa prot . 50Not all implementations will guarantee protection on a page basis; 51the granularity of protection changes may be as large as an entire region. 52.Sh SEE ALSO 53.Xr msync 2 , 54.Xr munmap 2 , 55.Xr madvise 2 , 56.Xr mincore 2 57.Sh HISTORY 58The 59.Fn mprotect 60function first appeared in 4.4BSD. | 44.Sh DESCRIPTION 45The 46.Fn mprotect 47system call 48changes the specified pages to have protection 49.Fa prot . 50Not all implementations will guarantee protection on a page basis; 51the granularity of protection changes may be as large as an entire region. 52.Sh SEE ALSO 53.Xr msync 2 , 54.Xr munmap 2 , 55.Xr madvise 2 , 56.Xr mincore 2 57.Sh HISTORY 58The 59.Fn mprotect 60function first appeared in 4.4BSD. |