exec_node: Add new talloc-based new()
authorCarl Worth <cworth@cworth.org>
Thu, 24 Jun 2010 01:11:51 +0000 (18:11 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 24 Jun 2010 01:59:35 +0000 (18:59 -0700)
commit1660a2954797e056caba319c5d6c70b0d4be22fe
tree172af2dd8effb58c89828b917cae850058312edd
parent8f52c9b5fcbc73ed12b23253caa44c28fd4452e2
exec_node: Add new talloc-based new()

And fix all callers to use the tallbac-based new for exec_node
construction. We make ready use of talloc_parent in order to get
valid, (and appropriate) talloc owners for everything we construct
without having to add new 'ctx' parameters up and down all the call
trees.

This closes the majority of the memory leaks in the
glsl-orangebook-ch06-bump.frag test:

total heap usage: 55,623 allocs, 42,672 frees
(was 14,533 frees)

Now 76.7% leak-free. Woo-hoo!
18 files changed:
ast_function.cpp
ast_to_hir.cpp
glsl_types.cpp
hir_field_selection.cpp
ir.cpp
ir_clone.cpp
ir_constant_expression.cpp
ir_copy_propagation.cpp
ir_dead_code.cpp
ir_dead_code_local.cpp
ir_expression_flattening.cpp
ir_function_inlining.cpp
ir_reader.cpp
ir_variable.cpp
ir_vec_index_to_swizzle.cpp
list.h
s_expression.cpp
s_expression.h