[][src]Type Definition dart_sys::Dart_OnNewCodeCallback

type Dart_OnNewCodeCallback = Option<unsafe extern "C" fn(observer: *mut Dart_CodeObserver, name: *const c_char, base: usize, size: usize)>;

Callback provided by the embedder that is used by the VM to notify on code object creation, before it is invoked the first time. This is useful for embedders wanting to e.g. keep track of PCs beyond the lifetime of the garbage collected code objects. Note that an address range may be used by more than one code object over the lifecycle of a process. Clients of this function should record timestamps for these compilation events and when collecting PCs to disambiguate reused address ranges.