libghostty
Loading...
Searching...
No Matches
allocator.h
Go to the documentation of this file.
1
6
7#ifndef GHOSTTY_VT_ALLOCATOR_H
8#define GHOSTTY_VT_ALLOCATOR_H
9
10#include <stdbool.h>
11#include <stddef.h>
12#include <stdint.h>
13
49
83typedef struct {
95 void* (*alloc)(void *ctx, size_t len, uint8_t alignment, uintptr_t ret_addr);
96
115 bool (*resize)(void *ctx, void *memory, size_t memory_len, uint8_t alignment, size_t new_len, uintptr_t ret_addr);
116
142 void* (*remap)(void *ctx, void *memory, size_t memory_len, uint8_t alignment, size_t new_len, uintptr_t ret_addr);
143
158 void (*free)(void *ctx, void *memory, size_t memory_len, uint8_t alignment, uintptr_t ret_addr);
160
179typedef struct GhosttyAllocator {
185 void *ctx;
186
193
195
196#endif /* GHOSTTY_VT_ALLOCATOR_H */
bool(* resize)(void *ctx, void *memory, size_t memory_len, uint8_t alignment, size_t new_len, uintptr_t ret_addr)
Definition allocator.h:115
void(* free)(void *ctx, void *memory, size_t memory_len, uint8_t alignment, uintptr_t ret_addr)
Definition allocator.h:158
const GhosttyAllocatorVtable * vtable
Definition allocator.h:191