summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/mm.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-02-19 11:58:49 -0500
committerKristian Høgsberg <[email protected]>2010-02-19 12:03:01 -0500
commit32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (patch)
tree5c44742f6d4f8711b6d1ca31d68d3245abd0187a /src/mesa/main/mm.c
parent6bf1ea897fa470af58fe8916dff45e2da79634a3 (diff)
Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
Diffstat (limited to 'src/mesa/main/mm.c')
-rw-r--r--src/mesa/main/mm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/main/mm.c b/src/mesa/main/mm.c
index d430bcdb840..3ef38e94be9 100644
--- a/src/mesa/main/mm.c
+++ b/src/mesa/main/mm.c
@@ -60,13 +60,13 @@ mmInit(unsigned ofs, unsigned size)
if (!size)
return NULL;
- heap = (struct mem_block *) _mesa_calloc(sizeof(struct mem_block));
+ heap = (struct mem_block *) calloc(1, sizeof(struct mem_block));
if (!heap)
return NULL;
- block = (struct mem_block *) _mesa_calloc(sizeof(struct mem_block));
+ block = (struct mem_block *) calloc(1, sizeof(struct mem_block));
if (!block) {
- _mesa_free(heap);
+ free(heap);
return NULL;
}
@@ -98,7 +98,7 @@ SliceBlock(struct mem_block *p,
/* break left [p, newblock, p->next], then p = newblock */
if (startofs > p->ofs) {
- newblock = (struct mem_block*) _mesa_calloc(sizeof(struct mem_block));
+ newblock = (struct mem_block*) calloc(1, sizeof(struct mem_block));
if (!newblock)
return NULL;
newblock->ofs = startofs;
@@ -122,7 +122,7 @@ SliceBlock(struct mem_block *p,
/* break right, also [p, newblock, p->next] */
if (size < p->size) {
- newblock = (struct mem_block*) _mesa_calloc(sizeof(struct mem_block));
+ newblock = (struct mem_block*) calloc(1, sizeof(struct mem_block));
if (!newblock)
return NULL;
newblock->ofs = startofs + size;
@@ -225,7 +225,7 @@ Join2Blocks(struct mem_block *p)
q->next_free->prev_free = q->prev_free;
q->prev_free->next_free = q->next_free;
- _mesa_free(q);
+ free(q);
return 1;
}
return 0;
@@ -270,9 +270,9 @@ mmDestroy(struct mem_block *heap)
for (p = heap->next; p != heap; ) {
struct mem_block *next = p->next;
- _mesa_free(p);
+ free(p);
p = next;
}
- _mesa_free(heap);
+ free(heap);
}