libmemalloc  v4.0.00
Modern Memory Allocator
Loading...
Searching...
No Matches
mem_arena_t Struct Reference

Represents a memory arena with its own free lists. More...

#include <libmemalloc.h>

Collaboration diagram for mem_arena_t:

Public Attributes

size_t num_bins
 
block_header_t ** bins
 
block_header_ttop_chunk
 

Detailed Description

Represents a memory arena with its own free lists.

This structure manages a group of free lists (bins) and tracks the top chunk in the heap for allocation strategies like top chunk extension. Each arena can hold multiple size classes to optimize allocation and minimize fragmentation.

Fields:
  • bins – Array of free lists (one per size class)
  • top_chunk – Top free block in the heap (for fast extension)
  • num_bins – Number of size classes (bins) managed by this arena

Member Data Documentation

◆ bins

block_header_t** mem_arena_t::bins

Array of pointers to bin heads

◆ num_bins

size_t mem_arena_t::num_bins

Number of bins in this arena

◆ top_chunk

block_header_t* mem_arena_t::top_chunk

Pointer to the top (wilderness) chunk


The documentation for this struct was generated from the following file: