package memtrace-mirage

  1. Overview
  2. Docs

Module Make.ExternalSource

Use External to track non-GC-heap allocations in a Memtrace trace

Sourcetype token
Sourceval alloc : bytes:int -> token option

alloc ~bytes reports an allocation of a given number of bytes.

If tracing is enabled, a small fraction of the calls to this function will return Some tok, where tok should be passed to free when the object is freed.

This function is very fast in the common case where it returns None

Sourceval free : token -> unit
OCaml

Innovation. Community. Security.