alloc: fix free

This commit is contained in:
Matheus
2023-04-23 22:05:54 -03:00
parent d85ec56503
commit ff478b51ed
+2 -2
View File
@@ -37,10 +37,10 @@ void *alloc(size_t size) {
void free(void *ptr) {
size_t *start = ptr;
start -= 1;
size_t size = *start;
start += 1;
scache_t *cache = getcachefromsize(size);
slab_free(cache, ptr);
slab_free(cache, start);
}
void alloc_init() {