]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/mach/vm_statistics.h
xnu-6153.101.6.tar.gz
[apple/xnu.git] / osfmk / mach / vm_statistics.h
index 9e72c81d2128d07b930a87c700aa4eab1c77f313..267d5df2fbe45f2f4c083848670d2124ef80706f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  *
@@ -223,6 +223,7 @@ typedef struct vm_purgeable_info        *vm_purgeable_info_t;
 #define VM_PAGE_QUERY_PAGE_CS_VALIDATED 0x100
 #define VM_PAGE_QUERY_PAGE_CS_TAINTED   0x200
 #define VM_PAGE_QUERY_PAGE_CS_NX        0x400
+#define VM_PAGE_QUERY_PAGE_REUSABLE     0x800
 
 #ifdef  MACH_KERNEL_PRIVATE
 
@@ -333,12 +334,13 @@ typedef struct pmap_statistics  *pmap_statistics_t;
 #define VM_FLAGS_USER_MAP       (VM_FLAGS_USER_ALLOCATE |       \
                                 VM_FLAGS_RETURN_4K_DATA_ADDR | \
                                 VM_FLAGS_RETURN_DATA_ADDR)
-#define VM_FLAGS_USER_REMAP     (VM_FLAGS_FIXED |    \
-                                VM_FLAGS_ANYWHERE | \
-                                VM_FLAGS_RANDOM_ADDR | \
-                                VM_FLAGS_OVERWRITE| \
-                                VM_FLAGS_RETURN_DATA_ADDR |\
-                                VM_FLAGS_RESILIENT_CODESIGN)
+#define VM_FLAGS_USER_REMAP     (VM_FLAGS_FIXED |               \
+                                VM_FLAGS_ANYWHERE |            \
+                                VM_FLAGS_RANDOM_ADDR |         \
+                                VM_FLAGS_OVERWRITE|            \
+                                VM_FLAGS_RETURN_DATA_ADDR |    \
+                                VM_FLAGS_RESILIENT_CODESIGN |  \
+                                VM_FLAGS_RESILIENT_MEDIA)
 
 #define VM_FLAGS_SUPERPAGE_SHIFT 16
 #define SUPERPAGE_NONE                  0       /* no superpages, if all bits are 0 */
@@ -379,7 +381,14 @@ typedef struct {
            vmkf_remap_prot_copy:1,
            vmkf_cs_enforcement_override:1,
            vmkf_cs_enforcement:1,
-           __vmkf_unused:16;
+           vmkf_nested_pmap:1,
+           vmkf_no_copy_on_read:1,
+#if !defined(CONFIG_EMBEDDED)
+           vmkf_32bit_map_va:1,
+           __vmkf_unused:13;
+#else
+           __vmkf_unused:14;
+#endif
 } vm_map_kernel_flags_t;
 #define VM_MAP_KERNEL_FLAGS_NONE (vm_map_kernel_flags_t) {              \
        .vmkf_atomic_entry = 0, /* keep entry atomic (no coalescing) */ \
@@ -398,10 +407,39 @@ typedef struct {
        .vmkf_remap_prot_copy = 0, /* vm_remap for VM_PROT_COPY */      \
        .vmkf_cs_enforcement_override = 0, /* override CS_ENFORCEMENT */ \
        .vmkf_cs_enforcement = 0,  /* new value for CS_ENFORCEMENT */   \
+       .vmkf_nested_pmap = 0, /* use a nested pmap */                  \
+       .vmkf_no_copy_on_read = 0, /* do not use copy_on_read */        \
        .__vmkf_unused = 0                                              \
 }
+
+typedef struct {
+       unsigned int
+           vmnekf_ledger_tag:3,
+           vmnekf_ledger_no_footprint:1,
+           __vmnekf_unused:28;
+} vm_named_entry_kernel_flags_t;
+#define VM_NAMED_ENTRY_KERNEL_FLAGS_NONE (vm_named_entry_kernel_flags_t) {    \
+       .vmnekf_ledger_tag = 0,                                                \
+       .vmnekf_ledger_no_footprint = 0,                                       \
+       .__vmnekf_unused = 0                                                   \
+}
+
 #endif /* KERNEL_PRIVATE */
 
+/* current accounting postmark */
+#define __VM_LEDGER_ACCOUNTING_POSTMARK 2019032600
+
+/* discrete values: */
+#define VM_LEDGER_TAG_NONE      0x00000000
+#define VM_LEDGER_TAG_DEFAULT   0x00000001
+#define VM_LEDGER_TAG_NETWORK   0x00000002
+#define VM_LEDGER_TAG_MEDIA     0x00000003
+#define VM_LEDGER_TAG_GRAPHICS  0x00000004
+#define VM_LEDGER_TAG_NEURAL    0x00000005
+#define VM_LEDGER_TAG_MAX       0x00000005
+/* individual bits: */
+#define VM_LEDGER_FLAG_NO_FOOTPRINT     0x00000001
+#define VM_LEDGER_FLAGS (VM_LEDGER_FLAG_NO_FOOTPRINT)
 
 
 #define VM_MEMORY_MALLOC 1
@@ -569,6 +607,15 @@ typedef struct {
 /* memory allocated by Accounts framework */
 #define VM_MEMORY_ACCOUNTS 98
 
+/* memory allocated by Sanitizer runtime libraries */
+#define VM_MEMORY_SANITIZER 99
+
+/* Differentiate memory needed by GPU drivers and frameworks from generic IOKit allocations */
+#define VM_MEMORY_IOACCELERATOR 100
+
+/* memory allocated by CoreMedia for global image registration of frames */
+#define VM_MEMORY_CM_REGWARP 101
+
 /* Reserve 240-255 for application */
 #define VM_MEMORY_APPLICATION_SPECIFIC_1 240
 #define VM_MEMORY_APPLICATION_SPECIFIC_16 255