update for HEAD-2003091401
[reactos.git] / include / ntos / mm.h
1 /*
2  * COPYRIGHT:    See COPYING in the top level directory
3  * PROJECT:      ReactOS kernel
4  * FILE:         include/mm.h
5  * PURPOSE:      Memory managment declarations used by all the parts of the 
6  *               system
7  * PROGRAMMER:   David Welch <welch@cwcom.net>
8  * UPDATE HISTORY: 
9  *               27/06/00: Created
10  */
11
12
13 #ifndef __INCLUDE_MM_H
14 #define __INCLUDE_MM_H
15
16 #ifndef __USE_W32API
17
18 #define SEC_BASED       (0x00200000)
19 #define SEC_NO_CHANGE   (0x00400000)
20 #define SEC_IMAGE       (0x01000000)
21 #define SEC_VLM         (0x02000000)
22 #define SEC_RESERVE     (0x04000000)
23 #define SEC_COMMIT      (0x08000000)
24 #define SEC_NOCACHE     (0x10000000)
25 #define PAGE_READONLY   (2)
26 #define PAGE_READWRITE  (4)
27 #define PAGE_WRITECOPY  (8)
28 #define PAGE_EXECUTE    (16)
29 #define PAGE_EXECUTE_READ       (32)
30 #define PAGE_EXECUTE_READWRITE  (64)
31 #define PAGE_EXECUTE_WRITECOPY  (128)
32 #define PAGE_GUARD      (256)
33 #define PAGE_NOACCESS   (1)
34 #define PAGE_NOCACHE    (512)
35 #define MEM_COMMIT      (4096)
36 #define MEM_FREE        (65536)
37 #define MEM_RESERVE     (8192)
38 #define MEM_IMAGE       (16777216)
39 #define MEM_MAPPED      (262144)
40 #define MEM_PRIVATE     (131072)
41 #define MEM_DECOMMIT    (16384)
42 #define MEM_RELEASE     (32768)
43 #define MEM_TOP_DOWN    (1048576)
44 #define EXCEPTION_GUARD_PAGE    (0x80000001L)
45 #define SECTION_EXTEND_SIZE     (0x10)
46 #define SECTION_MAP_EXECUTE     (0x8)
47 #define SECTION_MAP_READ        (0x4)
48 #define SECTION_MAP_WRITE       (0x2)
49 #define SECTION_QUERY           (0x1)
50 #define SECTION_ALL_ACCESS      (0xf001fL)
51
52 #define FILE_MAP_ALL_ACCESS     (0xf001fL)
53 #define FILE_MAP_READ   (4)
54 #define FILE_MAP_WRITE  (2)
55 #define FILE_MAP_COPY   (1)
56 #else /* __USE_W32API */
57
58 #include <ddk/ntifs.h>
59
60 #endif /* __USE_W32API */
61
62 #define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGE_SIZE) ? ((((ULONG)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG)x) )
63 #define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~(PAGE_SIZE-1)))
64
65 #endif /* __INCLUDE_MM_H */