Recycler.claim

Claims a free segment. Priority is first to use segments already in the disposed list from to_be_recycled. Next is to use a element in the recycler indices. Therefore removing a segment from the recycler. Secondly if no available segments then it appends a new segment to the blockfile and changes the owners last block index.

struct Recycler
nothrow
const(Index)
claim
(
const ulong segment_size
)
in (segment_size > 0)
out (result) { assert (result != Index.init); }

Parameters

segment_size ulong

in number of blocks.

Return Value

Type: const(Index)

Index pointer of a free segment