ralloc: use rzalloc where it's necessary
No change in behavior. ralloc_size is equivalent to rzalloc_size. That will change though. Calls not switched to rzalloc_size: - ralloc_vasprintf - glsl_type::name allocation (it's filled with snprintf) - C++ classes where valgrind didn't show uninitialized values I switched most of non-glsl stuff to rzalloc without checking whether it's really needed. Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -310,7 +310,7 @@ create_buffer_blocks(void *mem_ctx, struct gl_context *ctx,
|
||||
/* Allocate storage to hold all of the information related to uniform
|
||||
* blocks that can be queried through the API.
|
||||
*/
|
||||
struct gl_uniform_block *blocks = ralloc_array(mem_ctx, gl_uniform_block, num_blocks);
|
||||
struct gl_uniform_block *blocks = rzalloc_array(mem_ctx, gl_uniform_block, num_blocks);
|
||||
gl_uniform_buffer_variable *variables =
|
||||
ralloc_array(blocks, gl_uniform_buffer_variable, num_variables);
|
||||
|
||||
|
Reference in New Issue
Block a user