arena
struct hugepage_meta_common { enum arena_allocation_type type; uint16_t meta_pages; uint16_t reserved; uint32_t magic;};struct hugepage_meta_common referenced types:
struct hugepage_buddy_meta { struct hugepage_meta_common common; uint8_t order_of_block[512];};struct hugepage_buddy_meta referenced types:
struct hugepage_slab_metadata { size_t obj_size; size_t obj_count; void *free_list; uint8_t *alloc_bitmap;};struct arena { struct spinlock lock; struct minheap *hugepages; size_t max_hpages; struct hugepage_tb *tb; enum arena_flags flags; enum arena_allocation_type preferred;};struct arena referenced types:
enum arena_allocation_type { ARENA_ALLOCATION_TYPE_BITMAP = 0, ARENA_ALLOCATION_TYPE_BUDDY = 1, ARENA_ALLOCATION_TYPE_SLAB = 2, ARENA_ALLOCATION_TYPE_BUMP = 3, ARENA_ALLOCATION_TYPE_DEFAULT = ARENA_ALLOCATION_TYPE_BITMAP,};enum arena_flags { ARENA_FLAGS_DEMAND_ALLOC = (1 << 0), ARENA_FLAGS_RECLAIM_FREED = (1 << 1), ARENA_FLAGS_ALLOW_UNSAFE_DESTROY = (1 << 2), ARENA_FLAGS_SET_MAX_HUGEPAGES = (1 << 3), ARENA_FLAGS_RECYCLE = (1 << 4), ARENA_FLAGS_PRIVATE_HTB = (1 << 5), ARENA_FLAGS_ALWAYS_CREATE_NEW = (1 << 6), ARENA_FLAGS_DEFAULT = ARENA_FLAGS_RECLAIM_FREED | ARENA_FLAGS_RECYCLE,};bool arena_can_demand_alloc(struct arena *a);arena_can_demand_alloc referenced types:
bool arena_can_reclaim_freed(struct arena *a);arena_can_reclaim_freed referenced types:
bool arena_allows_unsafe_destroy(struct arena *a);arena_allows_unsafe_destroy referenced types:
bool arena_has_hugepage_limit(struct arena *a);arena_has_hugepage_limit referenced types:
bool arena_should_recycle(struct arena *a);arena_should_recycle referenced types:
bool arena_has_private_htb(struct arena *a);arena_has_private_htb referenced types:
bool arena_must_alloc_new(struct arena *a);arena_must_alloc_new referenced types:
Defines
Section titled “Defines”#define ARENA_HTB_SIZE 16