> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> One row per live sampled allocation from the jemalloc heap profiler; reading the table flushes a fresh heap profile. Only threads with the profiler armed contribute (`jemalloc_enable_profiler` setting or `jemalloc_enable_global_profiler` config); each row represents roughly `weight` similar allocations.

# system.jemalloc_sampled_allocations

<h2 id="description">
  Description
</h2>

One row per live sampled allocation from the jemalloc heap profiler; reading the table flushes a fresh heap profile. Only threads with the profiler armed contribute (`jemalloc_enable_profiler` setting or `jemalloc_enable_global_profiler` config); each row represents roughly `weight` similar allocations.

<h2 id="columns">
  Columns
</h2>

* `trace` ([Array(UInt64)](/docs/reference/data-types/array)) — Addresses of the allocating backtrace, leaf frame first (same convention as `system.trace_log.trace`). Symbolize with `addressToSymbol` and `demangle` (requires `allow_introspection_functions`).
* `age_ns` ([UInt64](/docs/reference/data-types/int-uint)) — Time in nanoseconds the allocation has been alive, relative to the moment the profile was flushed.
* `size` ([UInt64](/docs/reference/data-types/int-uint)) — Requested allocation size in bytes.
* `usize` ([UInt64](/docs/reference/data-types/int-uint)) — Usable size in bytes, i.e. the size class the request was rounded up to.
* `size_class` ([UInt16](/docs/reference/data-types/int-uint)) — Index of the size class. Joins to `system.jemalloc_bins.index` for small size classes.
* `arena` ([UInt32](/docs/reference/data-types/int-uint)) — Index of the arena the allocation was served from.
* `thr_uid` ([UInt64](/docs/reference/data-types/int-uint)) — jemalloc-internal unique id of the allocating thread.
* `sample_interval` ([UInt64](/docs/reference/data-types/int-uint)) — Average number of allocated bytes between samples, taken from the profile header. The same for all rows.

**Aliases:**

* `alloc_time` — Alias for `now() - intDiv(age_ns, 1000000000)`.
* `weight` — Alias for `1 / (1 - exp((-usize) / sample_interval))`.
