ghostty_alloc function
Allocate a buffer of len bytes.
Uses the provided allocator, or the default allocator if NULL is passed. The returned buffer must be freed with ghostty_free() using the same allocator.
@param allocator Pointer to the allocator to use, or NULL for the default @param len Number of bytes to allocate @return Pointer to the allocated buffer, or NULL if allocation failed
@ingroup allocator
Implementation
@ffi.Native<
ffi.Pointer<ffi.Uint8> Function(ffi.Pointer<GhosttyAllocator>, ffi.Size)
>()
external ffi.Pointer<ffi.Uint8> ghostty_alloc(
ffi.Pointer<GhosttyAllocator> allocator,
int len,
);