@@ -780,6 +780,13 @@ void MemDetailDiffReporter::diff_virtual_memory_sites() const {
780
780
} else if (compVal > 0 ) {
781
781
old_virtual_memory_site (early_site);
782
782
early_site = early_itr.next ();
783
+ } else if (early_site->flag () != current_site->flag ()) {
784
+ // This site was originally allocated with one flag, then released,
785
+ // then re-allocated at the same site (as far as we can tell) with a different flag.
786
+ old_virtual_memory_site (early_site);
787
+ early_site = early_itr.next ();
788
+ new_virtual_memory_site (current_site);
789
+ current_site = current_itr.next ();
783
790
} else {
784
791
diff_virtual_memory_site (early_site, current_site);
785
792
early_site = early_itr.next ();
@@ -842,8 +849,6 @@ void MemDetailDiffReporter::old_virtual_memory_site(const VirtualMemoryAllocatio
842
849
843
850
void MemDetailDiffReporter::diff_virtual_memory_site (const VirtualMemoryAllocationSite* early,
844
851
const VirtualMemoryAllocationSite* current) const {
845
- assert (early->flag () == current->flag () || early->flag () == mtNone,
846
- " Expect the same flag, but %s != %s" , NMTUtil::flag_to_name (early->flag ()),NMTUtil::flag_to_name (current->flag ()));
847
852
diff_virtual_memory_site (current->call_stack (), current->reserved (), current->committed (),
848
853
early->reserved (), early->committed (), current->flag ());
849
854
}
0 commit comments