Low_level.FixedFixed-buffer support.
val length : chunk -> intlength chunk is the block size.
val to_cstruct : ?len:int -> chunk -> Cstruct.tto_cstruct chunk is a cstruct of chunk's slice of the region. Note that this is a zero-copy view into the underlying region and so chunk should not be freed until this cstruct is no longer used.
val to_bigstring : ?len:int -> chunk -> Cstruct.bufferto_bigstring is like to_cstruct, but creates a Bigarray. Note that this is a zero-copy view into the underlying region and so chunk should not be freed until this Bigarray reference is no longer used.
val to_string : ?len:int -> chunk -> stringto_string ?len chunk will return a copy of chunk as an OCaml string.
val alloc : unit -> chunk optionAllocate a chunk of memory from the fixed buffer.
Warning: The memory is NOT zeroed out.
Passing such memory to Linux can be faster than using normal memory, in certain cases. There is a limited amount of such memory, and this will return None if none is available at present.
val alloc_or_wait : unit -> chunkLike alloc, but if there are no chunks available then it waits until one is.
val free : chunk -> unitval use : fallback:(unit -> 'a) -> (chunk -> 'a) -> 'ause ~fallback fn runs fn chunk with a freshly allocated chunk and then frees it.
If no chunks are available, it runs fallback () instead.