+2019-11-06 Jan Hubicka <jh@suse.cz>
+
+ * ggc-common.c (ggc_prune_overhead_list): Do not delete surviving
+ allocations.
+ * mem-stats.h (mem_alloc_description<T>::release_object_overhead):
+ Do not silently ignore summary corruptions.
+
2019-11-06 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vect_analyze_loop): Only try to vectorize
for (; it != ggc_mem_desc.m_reverse_object_map->end (); ++it)
if (!ggc_marked_p ((*it).first))
- (*it).second.first->m_collected += (*it).second.second;
-
- delete ggc_mem_desc.m_reverse_object_map;
- ggc_mem_desc.m_reverse_object_map = new map_t (13, false, false, false);
+ {
+ (*it).second.first->m_collected += (*it).second.second;
+ ggc_mem_desc.m_reverse_object_map->remove ((*it).first);
+ }
}
/* Return memory used by heap in kb, 0 if this info is not available. */
mem_alloc_description<T>::release_object_overhead (void *ptr)
{
std::pair <T *, size_t> *entry = m_reverse_object_map->get (ptr);
- if (entry)
- {
- entry->first->release_overhead (entry->second);
- m_reverse_object_map->remove (ptr);
- }
+ entry->first->release_overhead (entry->second);
+ m_reverse_object_map->remove (ptr);
}
/* Unregister a memory allocation descriptor registered with