Go to the documentation of this file.
40 #include "upb/port_def.inc"
103 return (
uint32_t*)(cleanup_metadata & ~0x1);
107 return cleanup_metadata & 0x1;
111 bool has_initial_block) {
138 while (
a->parent !=
a) {
140 a->parent =
next->parent;
155 a->last_size =
block->size;
171 if (!
block)
return false;
195 n = first_block_overhead + 256;
208 a->freelist_tail = NULL;
223 n = delta <=
n ?
n - delta : 0;
259 if (
block->cleanups > 0) {
303 if (r1 == r2)
return true;
340 if (*
p ==
',') *
p =
'.';
346 snprintf(
buf,
size,
"%.*g", DBL_DIG, val);
347 if (strtod(
buf, NULL) != val) {
348 snprintf(
buf,
size,
"%.*g", DBL_DIG + 2, val);
349 assert(strtod(
buf, NULL) == val);
356 snprintf(
buf,
size,
"%.*g", FLT_DIG, val);
357 if (strtof(
buf, NULL) != val) {
358 snprintf(
buf,
size,
"%.*g", FLT_DIG + 3, val);
359 assert(strtof(
buf, NULL) == val);
int __cdecl vsnprintf(char *buffer, size_t count, const char *format, va_list argptr)
UPB_INLINE void * upb_Arena_Realloc(upb_Arena *a, void *ptr, size_t oldsize, size_t size)
UPB_INLINE size_t _upb_ArenaHas(upb_Arena *a)
void upb_CleanupFunc(void *ud)
upb_Arena * upb_Arena_Init(void *mem, size_t n, upb_alloc *alloc)
struct cleanup_ent cleanup_ent
#define UPB_ALIGN_UP(size, align)
static void upb_FixLocale(char *p)
static bool upb_cleanup_has_initial_block(uintptr_t cleanup_metadata)
static void arena_dofree(upb_Arena *a)
static uintptr_t upb_cleanup_metadata(uint32_t *cleanup, bool has_initial_block)
#define UPB_PTR_AT(msg, ofs, type)
const char * upb_Status_ErrorMessage(const upb_Status *status)
void upb_Status_Clear(upb_Status *status)
void * _upb_Arena_SlowMalloc(upb_Arena *a, size_t size)
void upb_Status_SetErrorMessage(upb_Status *status, const char *msg)
static const size_t memblock_reserve
void upb_Status_VSetErrorFormat(upb_Status *status, const char *fmt, va_list args)
#define _kUpb_Status_MaxMessage
upb_CleanupFunc * cleanup
RefCountedPtr< grpc_tls_certificate_provider > root
static void * upb_global_allocfunc(upb_alloc *alloc, void *ptr, size_t oldsize, size_t size)
struct upb_Arena * parent
UPB_INLINE void * upb_Arena_Malloc(upb_Arena *a, size_t size)
void upb_Status_VAppendErrorFormat(upb_Status *status, const char *fmt, va_list args)
upb_Arena * arena_initslow(void *mem, size_t n, upb_alloc *alloc)
#define UPB_ALIGN_OF(type)
void upb_Status_SetErrorFormat(upb_Status *status, const char *fmt,...)
bool upb_Arena_AddCleanup(upb_Arena *a, void *ud, upb_CleanupFunc *func)
static void upb_Arena_addblock(upb_Arena *a, upb_Arena *root, void *ptr, size_t size)
_W64 unsigned int uintptr_t
UPB_INLINE void * upb_malloc(upb_alloc *alloc, size_t size)
#define UPB_ALIGN_DOWN(size, align)
uintptr_t cleanup_metadata
UPB_INLINE void upb_free(upb_alloc *alloc, void *ptr)
GTEST_API_ const char * fmt
bool upb_Status_IsOk(const upb_Status *status)
static void * upb_Arena_doalloc(upb_alloc *alloc, void *ptr, size_t oldsize, size_t size)
AllocList * next[kMaxLevel]
struct upb_Arena upb_Arena
ABSL_MUST_USE_RESULT bool ok() const
void _upb_EncodeRoundTripFloat(float val, char *buf, size_t size)
upb_cleanup_func * cleanup
@ kUpb_RoundTripBufferSize
static bool upb_Arena_Allocblock(upb_Arena *a, size_t size)
void _upb_EncodeRoundTripDouble(double val, char *buf, size_t size)
bool upb_Arena_Fuse(upb_Arena *a1, upb_Arena *a2)
void upb_Arena_Free(upb_Arena *a)
static uint32_t * upb_cleanup_pointer(uintptr_t cleanup_metadata)
static upb_Arena * arena_findroot(upb_Arena *a)
std::allocator< int > alloc
#define UPB_UNPOISON_MEMORY_REGION(addr, size)
upb_alloc upb_alloc_global
#define UPB_POISON_MEMORY_REGION(addr, size)
mem_block * freelist_tail
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:47