module Unsafe:sig..end
Unsafe pool is like an ordinary pool, except that the create function does
not require an initial element. The pool stores Obj.magic () as the dummy value
for each slot. Such a pool is only safe if one never accesses a slot from a freed
tuple.
It makes sense to use Unsafe if one has a small constrained chunk of code where
one can prove that one never accesses a freed tuple, and one needs a pool where
it is difficult to construct a dummy value.
Some Unsafe functions are faster than the corresponding safe version because they
do not have to maintain values with the correct represention in the Obj_array
backing the pool: free, create, grow.
include Pool_intf.Pool.S
val create : ('a, 'b) Slots.t -> capacity:int -> ('a, 'b) Slots.t tcreate slots ~capacity creates an empty pool that can hold up to capacity
N-tuples. The elements of a free tuple may contain stale and/or invalid values
for their types, and as such any access to a free tuple from this pool is
unsafe.