From 8b49cc104dd556218fc769178b96f4a8a428d057 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 17 May 2008 23:34:47 -0700 Subject: [PATCH] [intel-gem] Don't calloc reloc buffers Only a few relocations are typically used, so don't clear the whole thing. --- src/mesa/drivers/dri/intel/intel_bufmgr_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c b/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c index a14f7830f98..e08e3952bcf 100644 --- a/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c +++ b/src/mesa/drivers/dri/intel/intel_bufmgr_gem.c @@ -245,9 +245,9 @@ intel_setup_reloc_list(dri_bo *bo) dri_bo_gem *bo_gem = (dri_bo_gem *)bo; dri_bufmgr_gem *bufmgr_gem = (dri_bufmgr_gem *)bo->bufmgr; - bo_gem->relocs = calloc(bufmgr_gem->max_relocs, + bo_gem->relocs = malloc(bufmgr_gem->max_relocs * sizeof(struct drm_i915_gem_relocation_entry)); - bo_gem->reloc_target_bo = calloc(bufmgr_gem->max_relocs, sizeof(dri_bo *)); + bo_gem->reloc_target_bo = malloc(bufmgr_gem->max_relocs * sizeof(dri_bo *)); return 0; } -- 2.30.2