1 /*
2  * Defines for memory protection routines
3  *
4  * Copyright 2020 by Gray Watson
5  *
6  * This file is part of the dmalloc package.
7  *
8  * Permission to use, copy, modify, and distribute this software for
9  * any purpose and without fee is hereby granted, provided that the
10  * above copyright notice and this permission notice appear in all
11  * copies, and that the name of Gray Watson not be used in advertising
12  * or publicity pertaining to distribution of the document or software
13  * without specific, written prior permission.
14  *
15  * Gray Watson makes no representations about the suitability of the
16  * software described herein for any purpose.  It is provided "as is"
17  * without express or implied warranty.
18  *
19  * The author may be contacted via http://dmalloc.com/
20  */
21 
22 #ifndef __PROTECT_H__
23 #define __PROTECT_H__
24 
25 /*<<<<<<<<<<  The below prototypes are auto-generated by fillproto */
26 
27 /*
28  * void _dmalloc_protect_set_read_only
29  *
30  * Set the protections on a block to be read-only.
31  *
32  * ARGUMENTS:
33  *
34  * mem -> Pointer to block that we are protecting.
35  *
36  * block_n -> Number of blocks that we are protecting.
37  */
38 extern
39 void	_dmalloc_protect_set_read_only(void *mem, const int block_n);
40 
41 /*
42  * void _dmalloc_protect_set_read_write
43  *
44  * Set the protections on a block to be read-write.
45  *
46  * ARGUMENTS:
47  *
48  * mem -> Pointer to block that we are protecting.
49  *
50  * block_n -> Number of blocks that we are protecting.
51  */
52 extern
53 void	_dmalloc_protect_set_read_write(void *mem, const int block_n);
54 
55 /*
56  * void _dmalloc_protect_set_no_access
57  *
58  * Set the protections on a block to be no-access.
59  *
60  * ARGUMENTS:
61  *
62  * mem -> Pointer to block that we are protecting.
63  *
64  * block_n -> Number of blocks that we are protecting.
65  */
66 extern
67 void	_dmalloc_protect_set_no_access(void *mem, const int block_n);
68 
69 /*<<<<<<<<<<   This is end of the auto-generated output from fillproto. */
70 
71 #endif /* ! __PROTECT_H__ */
72