pub unsafe extern "C" fn ghostty_alloc(
allocator: *const GhosttyAllocator,
len: usize,
) -> *mut u8Expand description
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