From 52d2b28f7f107fbaff023533a15058055fa73bf0 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 7 Oct 2016 00:34:26 +0200 Subject: ralloc: use rzalloc where it's necessary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Edmondo Tommasina Reviewed-by: Nicolai Hähnle --- src/mesa/drivers/dri/i965/brw_state_batch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/i965/brw_state_batch.c b/src/mesa/drivers/dri/i965/brw_state_batch.c index d79e0ea00c7..9658b48ca13 100644 --- a/src/mesa/drivers/dri/i965/brw_state_batch.c +++ b/src/mesa/drivers/dri/i965/brw_state_batch.c @@ -46,9 +46,10 @@ brw_track_state_batch(struct brw_context *brw, if (!brw->state_batch_list) { /* Our structs are always aligned to at least 32 bytes, so * our array doesn't need to be any larger + * TODO: don't use rzalloc */ - brw->state_batch_list = ralloc_size(brw, sizeof(*brw->state_batch_list) * - batch->bo->size / 32); + brw->state_batch_list = rzalloc_size(brw, sizeof(*brw->state_batch_list) * + batch->bo->size / 32); } brw->state_batch_list[brw->state_batch_count].offset = offset; -- cgit v1.2.3