pub unsafe extern "C" fn ch_clone_scratch(
    src: *const ch_scratch_t,
    dest: *mut *mut ch_scratch_t
) -> ch_error_t
Expand description

Allocate a scratch space that is a clone of an existing scratch space.

This is useful when multiple concurrent threads will be using the same set of compiled databases, and another scratch space is required. Any allocator callback set by @ref ch_set_scratch_allocator() or @ref ch_set_allocator() will be used by this function.

@param src The existing @ref ch_scratch_t to be cloned.

@param dest A pointer to the new scratch space will be returned here.

@return @ref CH_SUCCESS on success; @ref CH_NOMEM if the allocation fails. Other errors may be returned if invalid parameters are specified.