return 1;
}
-static void bin_chunk(struct chunk *);
-
static void trim(struct chunk *self, size_t n)
{
size_t n1 = CHUNK_SIZE(self);
next->psize = n1-n | C_INUSE;
self->csize = n | C_INUSE;
- bin_chunk(split);
+ __bin_chunk(split);
}
void *malloc(size_t n)
return new;
}
-static void bin_chunk(struct chunk *self)
+void __bin_chunk(struct chunk *self)
{
struct chunk *next = NEXT_CHUNK(self);
size_t final_size, new_size, size;
if (IS_MMAPPED(self))
unmap_chunk(self);
else
- bin_chunk(self);
+ __bin_chunk(self);
}
void __malloc_donate(char *start, char *end)
struct chunk *c = MEM_TO_CHUNK(start), *n = MEM_TO_CHUNK(end);
c->psize = n->csize = C_INUSE;
c->csize = n->psize = C_INUSE | (end-start);
- bin_chunk(c);
+ __bin_chunk(c);
}