The buffer to resize.
The length of the buffer (in elements.)
The alignment of the buffer (in bytes.)
Notes:
Threadsafety: The underlying data will, if possible be updated atomically, however this does NOT prevent you from accessing stale references elsewhere. If you wish to access a slice across threads, you should use synchronisation primitives such as a mutex.
The resized buffer.
Resizes a slice to be of the given size and alignment. If the slice is not yet allocated, it will be.
When creating a slice with complex types you may wish to chain the resize operation with numem.lifetime.nogc_initialize.
Set length to 0 to free the buffer.