It is possible that VA right before the current anonymous clustering location was unmapped, e.g. this could happen when the malloc allocations interleave with explicit mmaps of the anonymous memory, and frees/unmaps. Mark anon mappings with a new map entry flag MAP_ENTRY_ANON_LOC_UPD, and update the map->anon_loc with the previous entry' end if freed entry is flagged.
ASLR: add a new mode for anonymous clustering control The value 3 for vm.cluster_anon still initializes the clustering point at the image creation, and never update it. So, all virtual address allocations are performed using an address-ordered, first-fit policy, just like we do when ASLR is turned off.