libcute 0.1
Loading...
Searching...
No Matches
Classes | Macros | Functions
slab.h File Reference
#include "memory/allocator.h"
#include <stddef.h>
Include dependency graph for slab.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cu_SlabAllocator
 
struct  cu_SlabAllocator_Config
 

Macros

#define CU_SLAB_DEFAULT_SIZE   4096
 

Functions

cu_Allocator cu_Allocator_SlabAllocator (cu_SlabAllocator *alloc, cu_SlabAllocator_Config cfg)
 
void cu_SlabAllocator_destroy (cu_SlabAllocator *alloc)
 

Detailed Description

Simple slab allocator.

Macro Definition Documentation

◆ CU_SLAB_DEFAULT_SIZE

#define CU_SLAB_DEFAULT_SIZE   4096

default slab size

Function Documentation

◆ cu_Allocator_SlabAllocator()

cu_Allocator cu_Allocator_SlabAllocator ( cu_SlabAllocator alloc,
cu_SlabAllocator_Config  cfg 
)

Create a slab allocator using the given configuration.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cu_SlabAllocator_destroy()

void cu_SlabAllocator_destroy ( cu_SlabAllocator alloc)

Release all memory owned by the allocator.

Here is the call graph for this function:
Here is the caller graph for this function: