Dart_OnNewCodeCallback typedef

Dart_OnNewCodeCallback = Pointer<NativeFunction<Void Function(Pointer<Dart_CodeObserver> observer, Pointer<Char> name, UintPtr base, UintPtr size)>>

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.

Implementation

typedef Dart_OnNewCodeCallback = ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<Dart_CodeObserver> observer, ffi.Pointer<ffi.Char> name, ffi.UintPtr base, ffi.UintPtr size)>>;