/*
- * Copyright (c) 2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2019 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
- *
+ *
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
- *
+ *
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
- *
+ *
* @APPLE_LICENSE_HEADER_END@
*/
/*
* Purgeable spelling rules
- * It is believed that the correct spelling is
+ * It is believed that the correct spelling is
* { 'p', 'u', 'r', 'g', 'e', 'a', 'b', 'l', 'e' }.
* However, there is one published API that likes to spell it without the
* first 'e', vm_purgable_control(). Since we can't change that API,
* mostly used on a user context and we don't want any contention with the
* pageout daemon.
*/
-decl_lck_mtx_data(extern,vm_purgeable_queue_lock)
+decl_lck_mtx_data(extern, vm_purgeable_queue_lock);
/* add a new token to queue. called by vm_object_purgeable_control */
/* enter with page queue locked */
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);
+uint64_t 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);
+void vm_purgeable_accounting(vm_object_t object,
+ vm_purgable_t old_state);
+void vm_object_owner_compressed_update(vm_object_t object,
+ int delta);
#define PURGEABLE_LOOP_MAX 64
-#define TOKEN_ADD 0x40 /* 0x100 */
-#define TOKEN_DELETE 0x41 /* 0x104 */
-#define TOKEN_RIPEN 0x42 /* 0x108 */
-#define OBJECT_ADD 0x48 /* 0x120 */
-#define OBJECT_REMOVE 0x49 /* 0x124 */
-#define OBJECT_PURGE 0x4a /* 0x128 */
-#define OBJECT_PURGE_ALL 0x4b /* 0x12c */
-#define OBJECT_PURGE_ONE 0x4c /* 0x12d */
-#define OBJECT_PURGE_LOOP 0x4e /* 0x12e */
+#define TOKEN_ADD 0x40 /* 0x100 */
+#define TOKEN_DELETE 0x41 /* 0x104 */
+#define TOKEN_RIPEN 0x42 /* 0x108 */
+#define OBJECT_ADD 0x48 /* 0x120 */
+#define OBJECT_REMOVE 0x49 /* 0x124 */
+#define OBJECT_PURGE 0x4a /* 0x128 */
+#define OBJECT_PURGE_ALL 0x4b /* 0x12c */
+#define OBJECT_PURGE_ONE 0x4c /* 0x12d */
+#define OBJECT_PURGE_LOOP 0x4e /* 0x12e */
#endif /* __VM_PURGEABLE_INTERNAL__ */