dr_hashtable_create

Function dr_hashtable_create 

Source
pub unsafe extern "C" fn dr_hashtable_create(
    drcontext: *mut c_void,
    bits: uint,
    load_factor_percent: uint,
    synch: bool_,
    free_payload_func: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut c_void)>,
) -> *mut c_void
Expand description

Allocates and initializes an open-address library-independent hashtable:

@param[in] drcontext This context controls whether thread-private or global heap is used for the table. @param[in] bits The base-2 log of the initial capacity of the table. @param[in] load_factor_percent The threshold of the table’s occupancy at which it will be resized (so smaller values keep the table sparser and generally more performant but at the cost of more memory). This is a percentage and so must be between 0 and 100. Values are typically in the 20-80 range and for performance critical tables would usually be below 50. @param[in] synch Whether to use a lock around all operations. @param[in] free_payload_func An optional function to call when removing an entry.

@return a pointer to the heap-allocated table.