Commit 5d24b4f2 by Jan Hubicka Committed by Jan Hubicka

ggc-common.c (ggc_prune_overhead_list): Do not delete surviving allocations.

	* 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.

From-SVN: r277890
parent 0c92c862
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> 2019-11-06 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vect_analyze_loop): Only try to vectorize * tree-vect-loop.c (vect_analyze_loop): Only try to vectorize
...@@ -1003,10 +1003,10 @@ ggc_prune_overhead_list (void) ...@@ -1003,10 +1003,10 @@ ggc_prune_overhead_list (void)
for (; it != ggc_mem_desc.m_reverse_object_map->end (); ++it) for (; it != ggc_mem_desc.m_reverse_object_map->end (); ++it)
if (!ggc_marked_p ((*it).first)) if (!ggc_marked_p ((*it).first))
(*it).second.first->m_collected += (*it).second.second; {
(*it).second.first->m_collected += (*it).second.second;
delete ggc_mem_desc.m_reverse_object_map; ggc_mem_desc.m_reverse_object_map->remove ((*it).first);
ggc_mem_desc.m_reverse_object_map = new map_t (13, false, false, false); }
} }
/* Return memory used by heap in kb, 0 if this info is not available. */ /* Return memory used by heap in kb, 0 if this info is not available. */
......
...@@ -535,11 +535,8 @@ inline void ...@@ -535,11 +535,8 @@ inline void
mem_alloc_description<T>::release_object_overhead (void *ptr) mem_alloc_description<T>::release_object_overhead (void *ptr)
{ {
std::pair <T *, size_t> *entry = m_reverse_object_map->get (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 /* Unregister a memory allocation descriptor registered with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment