mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
alloc: remove printf
This commit is contained in:
@@ -9,7 +9,6 @@ static size_t allocsizes[CACHE_COUNT] = {32, 64, 128, 256, 512, 1024, 2048, 4096
|
||||
static scache_t *caches[CACHE_COUNT];
|
||||
|
||||
static void initarea(scache_t *cache, void *obj) {
|
||||
printf("slab ctor called\n");
|
||||
size_t *ptr = obj;
|
||||
*ptr = cache->size - sizeof(size_t);
|
||||
memset(ptr + 1, 0, *ptr);
|
||||
@@ -44,8 +43,6 @@ void free(void *ptr) {
|
||||
slab_free(cache, ptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void alloc_init() {
|
||||
for (int i = 0; i < CACHE_COUNT; ++i) {
|
||||
caches[i] = slab_newcache(allocsizes[i] + sizeof(size_t), 0, initarea, initarea);
|
||||
|
||||
Reference in New Issue
Block a user