aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/shader/slang/slang_mem.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
committermarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
commit7933658107276f9d5491f8736a743cf8f8bbd5f2 (patch)
treef2893a761364e7abc9d934e9c5427e5cf5190c7a /mesalib/src/mesa/shader/slang/slang_mem.c
parent83fa9a9811e2c18cffd83a020757f7fb51ffddaa (diff)
downloadvcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.gz
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.bz2
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.zip
Updated to following packages:
mesa-7.8
Diffstat (limited to 'mesalib/src/mesa/shader/slang/slang_mem.c')
-rw-r--r--mesalib/src/mesa/shader/slang/slang_mem.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mesalib/src/mesa/shader/slang/slang_mem.c b/mesalib/src/mesa/shader/slang/slang_mem.c
index 9224578ed..5eaa7c442 100644
--- a/mesalib/src/mesa/shader/slang/slang_mem.c
+++ b/mesalib/src/mesa/shader/slang/slang_mem.c
@@ -56,12 +56,12 @@ struct slang_mempool_
slang_mempool *
_slang_new_mempool(GLuint initialSize)
{
- slang_mempool *pool = (slang_mempool *) _mesa_calloc(sizeof(slang_mempool));
+ slang_mempool *pool = (slang_mempool *) calloc(1, sizeof(slang_mempool));
if (pool) {
- pool->Data = (char *) _mesa_calloc(initialSize);
+ pool->Data = (char *) calloc(1, initialSize);
/*printf("ALLOC MEMPOOL %d at %p\n", initialSize, pool->Data);*/
if (!pool->Data) {
- _mesa_free(pool);
+ free(pool);
return NULL;
}
pool->Size = initialSize;
@@ -82,8 +82,8 @@ _slang_delete_mempool(slang_mempool *pool)
pool->Used, pool->Size, pool->Count, pool->Largest);
*/
total += pool->Used;
- _mesa_free(pool->Data);
- _mesa_free(pool);
+ free(pool->Data);
+ free(pool);
pool = next;
}
/*printf("TOTAL ALLOCATED: %u\n", total);*/
@@ -125,7 +125,7 @@ void *
_slang_alloc(GLuint bytes)
{
#if USE_MALLOC_FREE
- return _mesa_calloc(bytes);
+ return calloc(1, bytes);
#else
slang_mempool *pool;
GET_CURRENT_CONTEXT(ctx);
@@ -197,7 +197,7 @@ _slang_realloc(void *oldBuffer, GLuint oldSize, GLuint newSize)
ASSERT(is_valid_address(pool, oldBuffer));
if (newBuffer && oldBuffer && copySize > 0)
- _mesa_memcpy(newBuffer, oldBuffer, copySize);
+ memcpy(newBuffer, oldBuffer, copySize);
return newBuffer;
}
@@ -212,10 +212,10 @@ char *
_slang_strdup(const char *s)
{
if (s) {
- size_t l = _mesa_strlen(s);
+ size_t l = strlen(s);
char *s2 = (char *) _slang_alloc(l + 1);
if (s2)
- _mesa_strcpy(s2, s);
+ strcpy(s2, s);
return s2;
}
else {
@@ -231,7 +231,7 @@ void
_slang_free(void *addr)
{
#if USE_MALLOC_FREE
- _mesa_free(addr);
+ free(addr);
#else
if (addr) {
GET_CURRENT_CONTEXT(ctx);