]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Remove explicit padding from CacheAlignedInstrumentedMutex (#9809)
authorAndrew Kryczka <andrewkr@fb.com>
Wed, 6 Apr 2022 01:32:05 +0000 (18:32 -0700)
committerAndrew Kryczka <andrewkr@fb.com>
Mon, 18 Apr 2022 17:45:02 +0000 (10:45 -0700)
commit3345d12a1da38d20b2597fc2e5a8084a9cdaa8f7
tree2197608ff8d6b73ca58ee856f539e2c12eac48f3
parent9ed2144ebd24fce063c2d7311f3930a90a734f29
Remove explicit padding from CacheAlignedInstrumentedMutex (#9809)

Summary:
Fixes https://github.com/facebook/rocksdb/issues/9779.

The padding at the end of a struct is added implicitly according to the
sizeof spec: "When applied to a class, the result is the
number of bytes in an object of that class including any padding
required for placing objects of that type in an array"
(https://eel.is/c++draft/expr.sizeof#2.sentence-2). We should drop the
explicit padding since it assumed support for zero-length arrays, which
is non-standard.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9809

Test Plan: rely on CI

Reviewed By: riversand963

Differential Revision: D35413496

Pulled By: ajkr

fbshipit-source-id: 25d52ca45e648ad0d5657149f26f6adecbed1cb4
monitoring/instrumented_mutex.h