KEEL 1.0.0
Minimal C11 HTTP client/server library built on epoll/kqueue/io_uring/poll
Loading...
Searching...
No Matches
Data Fields
KlAllocator Struct Reference

Bring-your-own allocator vtable. More...

#include <allocator.h>

Data Fields

void *(* malloc )(void *ctx, size_t size)
 
void *(* realloc )(void *ctx, void *ptr, size_t old_size, size_t new_size)
 
void(* free )(void *ctx, void *ptr, size_t size)
 
void * ctx
 

Detailed Description

Bring-your-own allocator vtable.

All KEEL allocations go through this interface. Provide custom implementations for arena/pool allocation, tracking, or sandboxing.

Field Documentation

◆ malloc

void *(* KlAllocator::malloc) (void *ctx, size_t size)

Allocate size bytes

◆ realloc

void *(* KlAllocator::realloc) (void *ctx, void *ptr, size_t old_size, size_t new_size)

Resize allocation

◆ free

void(* KlAllocator::free) (void *ctx, void *ptr, size_t size)

Free allocation

◆ ctx

void* KlAllocator::ctx

User-provided context


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