treeSitterSetAllocator function
void
treeSitterSetAllocator({
- TreeSitterMallocFunction? malloc,
- TreeSitterCallocFunction? calloc,
- TreeSitterReallocFunction? realloc,
- TreeSitterFreeFunction? free,
Installs Tree-sitter allocation callbacks, resetting every null slot to its
default just like ts_set_allocator.
This is an observable pure-Dart callback boundary. It does not and cannot redirect allocations performed internally by the Dart VM.
Implementation
void treeSitterSetAllocator({
TreeSitterMallocFunction? malloc,
TreeSitterCallocFunction? calloc,
TreeSitterReallocFunction? realloc,
TreeSitterFreeFunction? free,
}) {
treeSitterAllocator._set(
malloc: malloc,
calloc: calloc,
realloc: realloc,
free: free,
);
}