Module CCAllocCache.Arr

module Arr: sig .. end

type 'a t 
Cache for 'a arrays
val create : ?buck_size:int -> int -> 'a t
create n makes a new cache of arrays up to length n
buck_size : number of arrays cached for each array length
val make : 'a t -> int -> 'a -> 'a array
make cache i x is like Array.make i x, but might return a cached array instead of allocating one. NOTE: if the array is already allocated then it will NOT be filled with x
val free : 'a t -> 'a array -> unit
Return array to the cache. The array's elements will not be GC'd
val with_ : 'a t -> int -> 'a -> f:('a array -> 'b) -> 'b
Combines CCAllocCache.Arr.make and CCAllocCache.Arr.free