]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/vm/vm_resident.c
xnu-3248.40.184.tar.gz
[apple/xnu.git] / osfmk / vm / vm_resident.c
index 25c1edb266ec449eae17e8cb2f0579ba9956b958..2ad202d0ea1d62ad66988d4c5fc33e6317310bbd 100644 (file)
@@ -7236,10 +7236,16 @@ process_account(mach_memory_info_t * sites, unsigned int __unused num_sites)
            }
            else
            {
+#if 1
+               site = NULL;
+#else
+               /* this code would free a site with no allocations but can race a new
+                * allocation being made */
                vm_tag_free_locked(site->tag);
                site->tag = VM_KERN_MEMORY_NONE;
                vm_allocation_sites[idx] = NULL;
                if (!(VM_TAG_UNLOAD & site->flags)) site = NULL;
+#endif
            }
        }
        lck_spin_unlock(&vm_allocation_sites_lock);