Commit 7b24b675 by Teresa Johnson Committed by Teresa Johnson

This patch adds a call to ggc_free from va_gc::release, which is called by vec_free.

This patch adds a call to ggc_free from va_gc::release, which is
called by vec_free. This restores the functionality of the old VEC_free
and reduces the memory footprint during compilation.

2013-07-11  Teresa Johnson  <tejohnson@google.com>

	* vec.h (struct va_gc): Move release out-of-line.
	(va_gc::release): Call ggc_free on released vec.

From-SVN: r200909
parent 85d4cbb8
2013-07-11 Teresa Johnson <tejohnson@google.com>
* vec.h (struct va_gc): Move release out-of-line.
(va_gc::release): Call ggc_free on released vec.
2013-07-11 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* config/rs6000/rs6000.md (""*tls_gd_low<TLSmode:tls_abi_suffix>"):
......
......@@ -337,10 +337,22 @@ struct va_gc
CXX_MEM_STAT_INFO);
template<typename T, typename A>
static void release (vec<T, A, vl_embed> *&v) { v = NULL; }
static void release (vec<T, A, vl_embed> *&v);
};
/* Free GC memory used by V and reset V to NULL. */
template<typename T, typename A>
inline void
va_gc::release (vec<T, A, vl_embed> *&v)
{
if (v)
::ggc_free (v);
v = NULL;
}
/* Allocator for GC memory. Ensure there are at least RESERVE free
slots in V. If EXACT is true, grow exactly, else grow
exponentially. As a special case, if the vector had not been
......
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