add memory usage

This commit is contained in:
TXuian
2024-10-29 16:17:43 +08:00
parent 968d66e5a9
commit 7b6c93d391
37 changed files with 654 additions and 115 deletions

View File

@@ -29,10 +29,12 @@ Modification:
*************************************************/
#pragma once
#include "actracer_tag.h"
#include <stddef.h>
#include <stdint.h>
struct slab_state {
TraceTag owner_tag;
struct slab_state *prev, *next;
uint64_t bitmap;
uintptr_t refcount;
@@ -40,6 +42,7 @@ struct slab_state {
};
struct slab_allocator {
size_t element_size;
size_t nr_elements;
size_t slabsize;