projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: move _mesa_clear_accum_buffer() inside FEATURE_accum test
[mesa.git]
/
src
/
mesa
/
main
/
mm.c
diff --git
a/src/mesa/main/mm.c
b/src/mesa/main/mm.c
index d430bcdb840b9150dfc461cb5ea452d7130424da..ab32123a40383b2881531010e3ee2eb49ef301ff 100644
(file)
--- a/
src/mesa/main/mm.c
+++ b/
src/mesa/main/mm.c
@@
-22,6
+22,11
@@
*
*/
*
*/
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "compiler.h"
#include "mm.h"
#include "mm.h"
@@
-60,13
+65,13
@@
mmInit(unsigned ofs, unsigned size)
if (!size)
return NULL;
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;
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) {
if (!block) {
-
_mesa_
free(heap);
+ free(heap);
return NULL;
}
return NULL;
}
@@
-98,7
+103,7
@@
SliceBlock(struct mem_block *p,
/* break left [p, newblock, p->next], then p = newblock */
if (startofs > p->ofs) {
/* 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;
if (!newblock)
return NULL;
newblock->ofs = startofs;
@@
-122,7
+127,7
@@
SliceBlock(struct mem_block *p,
/* break right, also [p, newblock, p->next] */
if (size < p->size) {
/* 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;
if (!newblock)
return NULL;
newblock->ofs = startofs + size;
@@
-206,7
+211,7
@@
mmFindBlock(struct mem_block *heap, unsigned start)
}
}
-static
INLINE
int
+static
inline
int
Join2Blocks(struct mem_block *p)
{
/* XXX there should be some assertions here */
Join2Blocks(struct mem_block *p)
{
/* XXX there should be some assertions here */
@@
-225,7
+230,7
@@
Join2Blocks(struct mem_block *p)
q->next_free->prev_free = q->prev_free;
q->prev_free->next_free = q->next_free;
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;
return 1;
}
return 0;
@@
-270,9
+275,9
@@
mmDestroy(struct mem_block *heap)
for (p = heap->next; p != heap; ) {
struct mem_block *next = p->next;
for (p = heap->next; p != heap; ) {
struct mem_block *next = p->next;
-
_mesa_
free(p);
+ free(p);
p = next;
}
p = next;
}
-
_mesa_
free(heap);
+ free(heap);
}
}