Skip to main content

dr_delay_flush_region

Function dr_delay_flush_region 

Source
pub unsafe extern "C" fn dr_delay_flush_region(
    start: app_pc,
    size: usize,
    flush_id: uint,
    flush_completion_callback: Option<unsafe extern "C" fn(flush_id: c_int)>,
) -> bool_
Expand description

Request a flush of all fragments containing code from the region [\p start, \p start + \p size). The flush will be performed at the next safe point in time (usually before any new code is added to the cache after this routine is called). If \p flush_completion_callback is non-NULL, it will be called with the \p flush_id provided to this routine when the flush completes, after which no execution will occur out of the fragments flushed. Returns true if the flush was successfully queued.

\note dr_flush_region() and dr_unlink_flush_region() can give stronger guarantees on when the flush will occur, but have more restrictions on use. \note Use \p size == 1 to flush fragments containing the instruction at address \p start. A flush of \p size == 0 is not allowed. \note As currently implemented there may be a performance penalty for requesting a \p flush_completion_callback; for most performant usage set \p flush_completion_callback to NULL.