]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/vm/vm_purgeable_internal.h
xnu-3247.1.106.tar.gz
[apple/xnu.git] / osfmk / vm / vm_purgeable_internal.h
index 4f720eb3940ace5d319a7aca2a1a8b2618e39dad..c958f6b0e059da97a1ae0d59164e43942a750c7c 100644 (file)
@@ -67,6 +67,8 @@ struct purgeable_q {
 typedef struct purgeable_q * purgeable_q_t;
 
 extern struct purgeable_q purgeable_queues[PURGEABLE_Q_TYPE_MAX];
+extern queue_head_t purgeable_nonvolatile_queue;
+extern int purgeable_nonvolatile_count;
 extern int32_t token_new_pagecount;
 #define TOKEN_NEW_PAGECOUNT_MAX INT32_MAX
 extern int available_for_purge;
@@ -88,6 +90,7 @@ kern_return_t vm_purgeable_token_add(purgeable_q_t queue);
 
 /* enter with page queue locked */
 void vm_purgeable_token_delete_first(purgeable_q_t queue);
+void vm_purgeable_token_delete_last(purgeable_q_t queue);
 
 /*
  * decrement token counters.
@@ -97,7 +100,7 @@ void vm_purgeable_q_advance_all(void);
 
 /* the object purger. purges the next eligible object from memory. */
 /* returns TRUE if an object was purged, otherwise FALSE. */
-boolean_t vm_purgeable_object_purge_one(void);
+boolean_t vm_purgeable_object_purge_one(int force_purge_below_group, int flags);
 
 /* purge all volatile objects now */
 void vm_purgeable_object_purge_all(void);
@@ -108,4 +111,21 @@ void vm_purgeable_object_add(vm_object_t object, purgeable_q_t queue, int group)
 /* look for object. If found, remove from purgeable queue. */
 purgeable_q_t vm_purgeable_object_remove(vm_object_t object);
 
+/* statistics for purgable objects in all queues */
+void vm_purgeable_stats(vm_purgeable_info_t info, task_t target_task);
+
+#if DEVELOPMENT || DEBUG
+/* statistics for purgeable object usage in all queues for a task */
+kern_return_t vm_purgeable_account(task_t task, pvm_account_info_t acnt_info);
+#endif /* DEVELOPMENT || DEBUG */
+
+int vm_purgeable_purge_task_owned(task_t task);
+void vm_purgeable_nonvolatile_enqueue(vm_object_t object, task_t task);
+void vm_purgeable_nonvolatile_dequeue(vm_object_t object);
+void vm_purgeable_accounting(vm_object_t       object,
+                            vm_purgable_t      old_state,
+                            boolean_t          disown);
+void vm_purgeable_compressed_update(vm_object_t        object,
+                                   int         delta);
+
 #endif /* __VM_PURGEABLE_INTERNAL__ */