libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal_scope_allocator.h File Reference

Go to the source code of this file.

Data Structures

struct  GblScopeAllocator
 

Macros

#define GblScopeAllocator_alloc(...)
 
#define GblScopeAllocator_pushDtor(...)
 
#define GblScopeAllocator_allocDefault_(...)
 
#define GblScopeAllocator_allocDefault__(self, size, align, dtor, ...)
 
#define GblScopeAllocator_pushDtorDefault_(...)
 
#define GblScopeAllocator_pushDtorDefault__(self, dtor, data, ...)
 

Typedefs

typedef GBL_RESULT(* GblScopeAllocatorDtorFn) (void *pPtr)
 

Functions

GblScopeAllocatorGblScopeAllocator_create (GblArenaAllocator *pArena)
 
GBL_RESULT GblScopeAllocator_construct (GblScopeAllocator *pSelf, GblArenaAllocator *pArena)
 
GBL_RESULT GblScopeAllocator_destroy (GblScopeAllocator *pSelf)
 
GBL_RESULT GblScopeAllocator_destruct (GblScopeAllocator *pSelf)
 
void * GblScopeAllocator_alloc (GblScopeAllocator *pSelf, size_t size, size_t align, GblScopeAllocatorDtorFn pFnDtor)
 
GBL_RESULT GblScopeAllocator_pushDtor (GblScopeAllocator *pSelf, GblScopeAllocatorDtorFn pFnDtor, void *pData)
 
size_t GblScopeAllocator_dtorCount (const GblScopeAllocator *pSelf)
 

Detailed Description

GblScopeAllocator stack-like arena sub allocator.

Arena-backed scope-based allocator.

Author
Falco Girgis

Definition in file gimbal_scope_allocator.h.

Macro Definition Documentation

◆ GblScopeAllocator_alloc

#define GblScopeAllocator_alloc ( ...)

Definition at line 48 of file gimbal_scope_allocator.h.

◆ GblScopeAllocator_pushDtor

#define GblScopeAllocator_pushDtor ( ...)

Definition at line 49 of file gimbal_scope_allocator.h.

◆ GblScopeAllocator_allocDefault_

#define GblScopeAllocator_allocDefault_ ( ...)

Definition at line 52 of file gimbal_scope_allocator.h.

52#define GblScopeAllocator_allocDefault_(...) \
53 GblScopeAllocator_allocDefault__(__VA_ARGS__, 0, GBL_NULL)

◆ GblScopeAllocator_allocDefault__

#define GblScopeAllocator_allocDefault__ ( self,
size,
align,
dtor,
... )

Definition at line 54 of file gimbal_scope_allocator.h.

54#define GblScopeAllocator_allocDefault__(self, size, align, dtor, ...) \
55 (GblScopeAllocator_alloc)(self, size, align, dtor)

◆ GblScopeAllocator_pushDtorDefault_

#define GblScopeAllocator_pushDtorDefault_ ( ...)

Definition at line 57 of file gimbal_scope_allocator.h.

57#define GblScopeAllocator_pushDtorDefault_(...) \
58 GblScopeAllocator_pushDtorDefault__(__VA_ARGS__, GBL_NULL)

◆ GblScopeAllocator_pushDtorDefault__

#define GblScopeAllocator_pushDtorDefault__ ( self,
dtor,
data,
... )

Definition at line 59 of file gimbal_scope_allocator.h.

59#define GblScopeAllocator_pushDtorDefault__(self, dtor, data, ...) \
60 (GblScopeAllocator_pushDtor)(self, dtor, data)

Typedef Documentation

◆ GblScopeAllocatorDtorFn

typedef GBL_RESULT(* GblScopeAllocatorDtorFn) (void *pPtr)

Definition at line 18 of file gimbal_scope_allocator.h.