mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Android libstdc++ is really stupid, it seems.
This commit is contained in:
parent
c4e08def0d
commit
81ae7c06b8
@ -25,7 +25,6 @@ SOFTWARE.
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <new> // std::hardware_destructive_interference_size
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <type_traits> // std::enable_if, std::is_*_constructible
|
#include <type_traits> // std::enable_if, std::is_*_constructible
|
||||||
|
|
||||||
@ -113,12 +112,7 @@ public:
|
|||||||
size_t capacity() const noexcept { return capacity_ - 1; }
|
size_t capacity() const noexcept { return capacity_ - 1; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef __cpp_lib_hardware_interference_size
|
|
||||||
static constexpr size_t kCacheLineSize =
|
|
||||||
std::hardware_destructive_interference_size;
|
|
||||||
#else
|
|
||||||
static constexpr size_t kCacheLineSize = 64;
|
static constexpr size_t kCacheLineSize = 64;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Padding to avoid false sharing between slots_ and adjacent allocations
|
// Padding to avoid false sharing between slots_ and adjacent allocations
|
||||||
static constexpr size_t kPadding = (kCacheLineSize - 1) / sizeof(T) + 1;
|
static constexpr size_t kPadding = (kCacheLineSize - 1) / sizeof(T) + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user