MmapArray.allocate

Initial allocation of the array memory.

struct MmapArray(T, bool shrink = false)
@trusted @nogc
void
allocate
(,
bool registerWithGC = false
)

Parameters

numElements size_t

The initial number of elements of the array.

registerWithGC bool

Whether the array's memory should be scanned by the GC. This is required for arrays holding pointers to GC-allocated memory.

Notes: Should be called on a closed array.

This method is added for symmetry with free(). Its use is optional. If registerWithGC is false, this call has the same effect as setting length on a closed array.

Meta