fn ensureTotalCapacity(self: *Self, gpa: Allocator, new_capacity: usize) !void

Modify the array so that it can hold at least new_capacity items. Implements super-linear growth to achieve amortized O(1) append operations. Invalidates pointers if additional memory is needed.

Parameters

self: *Self,
gpa: Allocator,
new_capacity: usize,