[Bf-blender-cvs] [2496636] master: GPU: replace callocs with malloc since reallocs aren't cleared

Campbell Barton noreply at git.blender.org
Wed Apr 9 01:35:51 CEST 2014


Commit: 2496636a6536fcc19b0b0d8ad510ae9c64b424d7
Author: Campbell Barton
Date:   Wed Apr 9 09:30:00 2014 +1000
https://developer.blender.org/rB2496636a6536fcc19b0b0d8ad510ae9c64b424d7

GPU: replace callocs with malloc since reallocs aren't cleared

===================================================================

M	source/blender/gpu/intern/gpu_buffers.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index f1b9e3f..22cfc71 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -118,10 +118,10 @@ static GPUBufferPool *gpu_buffer_pool_new(void)
 
 	pool->maxsize = MAX_FREE_GPU_BUFFERS;
 	pool->maxpbvhsize = MAX_FREE_GPU_BUFF_IDS;
-	pool->buffers = MEM_callocN(sizeof(*pool->buffers) * pool->maxsize,
-								"GPUBufferPool.buffers");
-	pool->pbvhbufids = MEM_callocN(sizeof(*pool->pbvhbufids) * pool->maxpbvhsize,
-								"GPUBufferPool.pbvhbuffers");
+	pool->buffers = MEM_mallocN(sizeof(*pool->buffers) * pool->maxsize,
+	                            "GPUBufferPool.buffers");
+	pool->pbvhbufids = MEM_mallocN(sizeof(*pool->pbvhbufids) * pool->maxpbvhsize,
+	                               "GPUBufferPool.pbvhbuffers");
 	return pool;
 }




More information about the Bf-blender-cvs mailing list