> ## 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.

> jemalloc 힙 프로파일러가 샘플링한 활성 할당당 한 행을 제공하며, 이 테이블을 읽으면 새로운 힙 프로파일이 플러시됩니다. 프로파일러가 활성화된 스레드만 반영됩니다(`jemalloc_enable_profiler` 설정 또는 `jemalloc_enable_global_profiler` 구성). 각 행은 유사한 할당 약 `weight`개를 나타냅니다.

# system.jemalloc_sampled_allocations

## 설명

jemalloc 힙 프로파일러가 샘플링한 활성 메모리 할당(allocation) 하나당 한 행이 생성되며, 이 테이블을 읽으면 새로운 힙 프로파일이 플러시됩니다. 프로파일러가 활성화된 스레드만 데이터를 기록하며(`jemalloc_enable_profiler` 설정 또는 `jemalloc_enable_global_profiler` 구성), 각 행은 유사한 할당 약 `weight`개를 나타냅니다.

## 컬럼

* `trace` ([Array(UInt64)](/docs/ko/reference/data-types/array)) — 할당을 수행한 백트레이스의 주소이며, 리프 프레임이 먼저 옵니다(`system.trace_log.trace`와 동일한 규칙). `addressToSymbol` 및 `demangle`로 심볼화할 수 있습니다(`allow_introspection_functions` 필요).
* `age_ns` ([UInt64](/docs/ko/reference/data-types/int-uint)) — 프로파일이 플러시된 시점을 기준으로, 해당 할당이 살아 있던 시간(나노초).
* `size` ([UInt64](/docs/ko/reference/data-types/int-uint)) — 요청된 할당 크기(바이트).
* `usize` ([UInt64](/docs/ko/reference/data-types/int-uint)) — 사용 가능한 크기(바이트), 즉 요청이 올림 처리된 크기 클래스의 크기.
* `size_class` ([UInt16](/docs/ko/reference/data-types/int-uint)) — 크기 클래스의 인덱스. 작은 크기 클래스는 `system.jemalloc_bins.index`와 조인됩니다.
* `arena` ([UInt32](/docs/ko/reference/data-types/int-uint)) — 해당 할당이 처리된 arena의 인덱스.
* `thr_uid` ([UInt64](/docs/ko/reference/data-types/int-uint)) — 할당을 수행한 스레드의 jemalloc 내부 고유 ID.
* `sample_interval` ([UInt64](/docs/ko/reference/data-types/int-uint)) — 프로파일 헤더에서 가져온, 샘플 간 평균 할당 바이트 수. 모든 행에서 동일합니다.

**Aliases:**

* `alloc_time` — `now() - intDiv(age_ns, 1000000000)`의 alias입니다.
* `weight` — `1 / (1 - exp((-usize) / sample_interval))`의 alias입니다.
