ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_webp_arena.h
Go to the documentation of this file.
1
41#pragma once
42
43#include <stddef.h>
44#include <stdint.h>
45
71typedef struct {
72 uint8_t* base;
73 size_t cap;
74 size_t offset;
75 uint32_t live;
77
97
113void ra8_webp_arena_unbind(void);
114
134void* ra8_webp_arena_malloc(size_t n);
135
156void* ra8_webp_arena_calloc(size_t nmemb, size_t size);
157
176void ra8_webp_arena_free(void* p);
void ra8_webp_arena_unbind(void)
Unbind the active arena; subsequent allocation hooks fail with nullptr.
void * ra8_webp_arena_calloc(size_t nmemb, size_t size)
libwebp WebPSafeCalloc hook: zeroed nmemb * size bytes.
void ra8_webp_arena_free(void *p)
libwebp WebPSafeFree hook: release a block; auto-reset when none live.
void ra8_webp_arena_bind(ra8_webp_arena_t *arena)
Bind arena as the active scratch for subsequent decode allocations.
void * ra8_webp_arena_malloc(size_t n)
libwebp WebPSafeMalloc hook: bump n bytes from the bound arena.
Caller-owned bump arena backing a single WebP decode.
size_t cap
Backing-store capacity in bytes.
uint8_t * base
First byte of caller-owned backing store (>= cap bytes).
uint32_t live
Count of outstanding (unfreed) allocations.
size_t offset
Bump cursor; next allocation starts here.