allocateArray

open fun allocateArray(elementCount: Long, allocator: SegmentAllocator): MemorySegment

Allocate an array of size elementCount using allocator. The returned segment has size elementCount * layout().byteSize().