Function darts_set_array

Source
pub unsafe extern "C" fn darts_set_array(
    darts: DartsT,
    ptr: *const c_void,
    size: size_t,
)
Expand description

Calls darts_clear in order to free memory allocated to the old array and then sets a new array. This function is useful to set a memory- mapped array.

Note that the array set by this function is not freed in darts_clear and darts_delete.

darts_set_array() can also set the size of the new array but the size is not used in search methods. So it works well even if the size is 0 or omitted. Remember that darts_size and darts_total_size returns 0 in such a case.