X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/c7d2c2c6ee645e10cbccdd01c6191873ec77239d..490019cf9519204c5fb36b2fba54ceb983bb6b72:/osfmk/vm/vm_resident.c diff --git a/osfmk/vm/vm_resident.c b/osfmk/vm/vm_resident.c index 25c1edb26..2ad202d0e 100644 --- a/osfmk/vm/vm_resident.c +++ b/osfmk/vm/vm_resident.c @@ -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);