diff options
author | gluk47 <gluk47@yandex-team.com> | 2023-06-22 19:18:03 +0300 |
---|---|---|
committer | gluk47 <gluk47@yandex-team.com> | 2023-06-22 19:18:03 +0300 |
commit | 0f9dc28e30a64f77566e0d4394ae6c32a18d84f8 (patch) | |
tree | 0dfcdcf2cf6424804473046672832a0c5462cea8 | |
parent | 2e212624fe5240e6b6c38619e12136353b2b960c (diff) | |
download | ydb-0f9dc28e30a64f77566e0d4394ae6c32a18d84f8.tar.gz |
[begemot] monlib: fix alignment for 32-bit arch /
`pair<..., ui64>` is aligned by 8 bytes, whereas
`TExplicitHistogramSnapshot` contains only ui32 which does not have to be 8-byte-aligned.
This patch fixes a static assert from the line 203: `alignof(TExplicitHistogramSnapshot) == alignof(TBucket)`
-rw-r--r-- | library/cpp/monlib/metrics/histogram_snapshot.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/cpp/monlib/metrics/histogram_snapshot.h b/library/cpp/monlib/metrics/histogram_snapshot.h index e8acf6ac2b..d1a32c3f94 100644 --- a/library/cpp/monlib/metrics/histogram_snapshot.h +++ b/library/cpp/monlib/metrics/histogram_snapshot.h @@ -137,7 +137,7 @@ namespace NMonitoring { // | vptr | RefsCount | BucketsCount | Bound1 | Value1 | ... | BoundN | ValueN | // +------+-----------+--------------+--------+--------+- -+--------+--------+ // - class TExplicitHistogramSnapshot: public IHistogramSnapshot, private TNonCopyable { + class alignas(TBucketValue) TExplicitHistogramSnapshot: public IHistogramSnapshot, private TNonCopyable { public: static TIntrusivePtr<TExplicitHistogramSnapshot> New(ui32 bucketsCount) { size_t bucketsSize = bucketsCount * sizeof(TBucket); |