Mesa (gallium-0.1): gallium: fix mis-matched malloc/free vs. aligned malloc /free
Brian Paul
brianp at kemper.freedesktop.org
Fri Oct 17 19:38:39 UTC 2008
Module: Mesa
Branch: gallium-0.1
Commit: 8d6ef125ac6044438db5b89d6d310ccfc4b8140a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d6ef125ac6044438db5b89d6d310ccfc4b8140a
Author: Brian Paul <brian.paul at tungstengraphics.com>
Date: Fri Oct 17 13:35:42 2008 -0600
gallium: fix mis-matched malloc/free vs. aligned malloc/free
Use aligned malloc/free for teximage data everywhere to be consistant.
The mismatch didn't make any difference when HAVE_POSIX_MEMALIGN was defined.
---
src/mesa/state_tracker/st_cb_texture.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index a018cde..0b2b639 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -156,7 +156,7 @@ st_FreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
}
if (texImage->Data) {
- free(texImage->Data);
+ _mesa_align_free(texImage->Data);
texImage->Data = NULL;
}
}
@@ -541,7 +541,7 @@ st_TexImage(GLcontext * ctx,
sizeInBytes = depth * dstRowStride * postConvHeight;
}
- texImage->Data = malloc(sizeInBytes);
+ texImage->Data = _mesa_align_malloc(sizeInBytes, 16);
}
if (!texImage->Data) {
More information about the mesa-commit
mailing list