From c774e89387a43d737abbdd99781a294c1cceebb2 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sun, 7 Feb 2016 14:08:24 +0100 Subject: Fix page cache accounting * vm/vm_object.c (vm_object_bootstrap): Set template object `cached' member to FALSE. (vm_object_cache_add, vm_object_cache_remove): New functions. (vm_object_collect, vm_object_deallocate, vm_object_lookup, vm_object_lookup_name, vm_object_destroy): Use new cache management functions. (vm_object_terminate, vm_object_collapse): Make sure object isn't cached. * vm/vm_object.h (struct vm_object): New `cached' member. --- vm/vm_object.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vm/vm_object.h') diff --git a/vm/vm_object.h b/vm/vm_object.h index 95798790..6b9f0bcf 100644 --- a/vm/vm_object.h +++ b/vm/vm_object.h @@ -148,8 +148,9 @@ struct vm_object { */ /* boolean_t */ use_shared_copy : 1,/* Use shared (i.e., * delayed) copy on write */ - /* boolean_t */ shadowed: 1; /* Shadow may exist */ + /* boolean_t */ shadowed: 1, /* Shadow may exist */ + /* boolean_t */ cached: 1; /* Object is cached */ queue_chain_t cached_list; /* Attachment point for the list * of objects cached as a result * of their can_persist value -- cgit v1.2.3