PTR ptr;
{
int type;
- size_t block, blocks;
+ size_t block;//, blocks; unused variable?
register size_t i;
struct list *prev, *next;
/* Get the address of the first free fragment in this block. */
prev = (struct list *)
- ((PTR) ADDRESS(block) +
- (mdp -> heapinfo[block].busy.info.frag.first << type));
+ ((char*) ADDRESS(block) +
+ ( mdp -> heapinfo[block].busy.info.frag.first << type));
if (mdp -> heapinfo[block].busy.info.frag.nfree ==
(BLOCKSIZE >> type) - 1)
}
}
+
+/* Useless prototype to make gcc happy */
+void free(void* ptr);
+
+
/* When using this package, provide a version of malloc/realloc/free built
on top of it, so that if we use the default sbrk() region we will not
collide with another malloc package trying to do the same thing, if
as inside a system library). */
void
-free (ptr)
- PTR ptr;
+free (PTR ptr)
{
mfree ((PTR) NULL, ptr);
}