WPILibC++ 2027.0.0-alpha-3
Loading...
Searching...
No Matches
arena.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "upb/mem/alloc.h"
#include "upb/mem/internal/arena.h"
#include "upb/port/def.inc"
#include "upb/port/undef.inc"

Go to the source code of this file.

Typedefs

typedef struct upb_Arena upb_Arena
 
typedef void upb_AllocCleanupFunc(upb_alloc *alloc)
 

Functions

UPB_API upb_Arenaupb_Arena_Init (void *mem, size_t n, upb_alloc *alloc)
 
UPB_API void upb_Arena_Free (upb_Arena *a)
 
UPB_API void upb_Arena_SetAllocCleanup (upb_Arena *a, upb_AllocCleanupFunc *func)
 
UPB_API bool upb_Arena_Fuse (const upb_Arena *a, const upb_Arena *b)
 
UPB_API bool upb_Arena_IsFused (const upb_Arena *a, const upb_Arena *b)
 
UPB_API upb_allocupb_Arena_GetUpbAlloc (upb_Arena *a)
 
bool upb_Arena_IncRefFor (const upb_Arena *a, const void *owner)
 
void upb_Arena_DecRefFor (const upb_Arena *a, const void *owner)
 
uintptr_t upb_Arena_SpaceAllocated (const upb_Arena *a, size_t *fused_count)
 
uint32_t upb_Arena_DebugRefCount (const upb_Arena *a)
 
UPB_API_INLINE upb_Arenaupb_Arena_New (void)
 
UPB_API_INLINE upb_Arenaupb_Arena_NewSized (size_t size_hint)
 
UPB_API_INLINE void * upb_Arena_Malloc (struct upb_Arena *a, size_t size)
 
UPB_API_INLINE void * upb_Arena_Realloc (upb_Arena *a, void *ptr, size_t oldsize, size_t size)
 
static const size_t UPB_PRIVATE (kUpbDefaultMaxBlockSize)
 
void upb_Arena_SetMaxBlockSize (size_t max)
 
UPB_API_INLINE void upb_Arena_ShrinkLast (upb_Arena *a, void *ptr, size_t oldsize, size_t size)
 
UPB_API_INLINE bool upb_Arena_TryExtend (upb_Arena *a, void *ptr, size_t oldsize, size_t size)
 

Typedef Documentation

◆ upb_AllocCleanupFunc

typedef void upb_AllocCleanupFunc(upb_alloc *alloc)

◆ upb_Arena

typedef struct upb_Arena upb_Arena

Function Documentation

◆ upb_Arena_DebugRefCount()

uint32_t upb_Arena_DebugRefCount ( const upb_Arena * a)

◆ upb_Arena_DecRefFor()

void upb_Arena_DecRefFor ( const upb_Arena * a,
const void * owner )

◆ upb_Arena_Free()

UPB_API void upb_Arena_Free ( upb_Arena * a)

◆ upb_Arena_Fuse()

UPB_API bool upb_Arena_Fuse ( const upb_Arena * a,
const upb_Arena * b )

◆ upb_Arena_GetUpbAlloc()

UPB_API upb_alloc * upb_Arena_GetUpbAlloc ( upb_Arena * a)

◆ upb_Arena_IncRefFor()

bool upb_Arena_IncRefFor ( const upb_Arena * a,
const void * owner )

◆ upb_Arena_Init()

UPB_API upb_Arena * upb_Arena_Init ( void * mem,
size_t n,
upb_alloc * alloc )

◆ upb_Arena_IsFused()

UPB_API bool upb_Arena_IsFused ( const upb_Arena * a,
const upb_Arena * b )

◆ upb_Arena_Malloc()

UPB_API_INLINE void * upb_Arena_Malloc ( struct upb_Arena * a,
size_t size )

◆ upb_Arena_New()

UPB_API_INLINE upb_Arena * upb_Arena_New ( void )

◆ upb_Arena_NewSized()

UPB_API_INLINE upb_Arena * upb_Arena_NewSized ( size_t size_hint)

◆ upb_Arena_Realloc()

UPB_API_INLINE void * upb_Arena_Realloc ( upb_Arena * a,
void * ptr,
size_t oldsize,
size_t size )

◆ upb_Arena_SetAllocCleanup()

UPB_API void upb_Arena_SetAllocCleanup ( upb_Arena * a,
upb_AllocCleanupFunc * func )

◆ upb_Arena_SetMaxBlockSize()

void upb_Arena_SetMaxBlockSize ( size_t max)

◆ upb_Arena_ShrinkLast()

UPB_API_INLINE void upb_Arena_ShrinkLast ( upb_Arena * a,
void * ptr,
size_t oldsize,
size_t size )

◆ upb_Arena_SpaceAllocated()

uintptr_t upb_Arena_SpaceAllocated ( const upb_Arena * a,
size_t * fused_count )

◆ upb_Arena_TryExtend()

UPB_API_INLINE bool upb_Arena_TryExtend ( upb_Arena * a,
void * ptr,
size_t oldsize,
size_t size )

◆ UPB_PRIVATE()

static const size_t UPB_PRIVATE ( kUpbDefaultMaxBlockSize )
static