Function rftrace_frontend::init

source ·
pub fn init(max_event_count: usize, overwriting: bool) -> &'static mut Events
Expand description

Initializes a new event buffer.

Allocs a new buffer of size max_event_count and passes it to the backend. If overwriting, treats it as a ring-buffer, keeping only the most-recent entries, otherwise it stopps logging once it is full. max_event_count will not be filled completely, since space is left for the returns of hooked functions. Currently, the maximum stack-depth is 1000. Consequently, max_event_count has to be greater than 1000.