va/lang/foreign/SegmentAllocator.html" title="class or interface in java.lang.foreign" class="external-link">SegmentAllocator</a>&nbsp;allocator)</span></div>
<div class="block">Allocate an array of size <code>elementCount</code> using <code>allocator</code>.
 The returned segment has size <code>elementCount * layout().byteSize()</code>.</div>
</div>
</section>
</li>
<li>
<section class="detail" id="reinterpret(java.lang.foreign.MemorySegment,java.lang.foreign.Arena,java.util.function.Consumer)">
<h3>reinte