From 32f2fd1c5d6088692551c80352b7d6fa35b0cd09 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Fri, 19 Feb 2010 11:58:49 -0500 Subject: Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions --- src/mesa/shader/hash_table.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/shader/hash_table.c') diff --git a/src/mesa/shader/hash_table.c b/src/mesa/shader/hash_table.c index e89a2564d7..fa6ba2bfdf 100644 --- a/src/mesa/shader/hash_table.c +++ b/src/mesa/shader/hash_table.c @@ -65,7 +65,7 @@ hash_table_ctor(unsigned num_buckets, hash_func_t hash, num_buckets = 16; } - ht = _mesa_malloc(sizeof(*ht) + ((num_buckets - 1) + ht = malloc(sizeof(*ht) + ((num_buckets - 1) * sizeof(ht->buckets[0]))); if (ht != NULL) { ht->hash = hash; @@ -85,7 +85,7 @@ void hash_table_dtor(struct hash_table *ht) { hash_table_clear(ht); - _mesa_free(ht); + free(ht); } @@ -100,7 +100,7 @@ hash_table_clear(struct hash_table *ht) for (i = 0; i < ht->num_buckets; i++) { foreach_s(node, temp, & ht->buckets[i]) { remove_from_list(node); - _mesa_free(node); + free(node); } assert(is_empty_list(& ht->buckets[i])); @@ -134,7 +134,7 @@ hash_table_insert(struct hash_table *ht, void *data, const void *key) const unsigned bucket = hash_value % ht->num_buckets; struct hash_node *node; - node = _mesa_calloc(sizeof(*node)); + node = calloc(1, sizeof(*node)); node->data = data; node->key = key; -- cgit v1.2.3