| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stddef.h> |
| 6 |
| 5 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 6 #include "base/atomic_sequence_num.h" | 8 #include "base/atomic_sequence_num.h" |
| 7 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 8 #include "base/memory/aligned_memory.h" | 10 #include "base/memory/aligned_memory.h" |
| 9 #include "base/threading/simple_thread.h" | 11 #include "base/threading/simple_thread.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 13 |
| 12 namespace { | 14 namespace { |
| 13 | 15 |
| 14 base::StaticAtomicSequenceNumber constructed_seq_; | 16 base::StaticAtomicSequenceNumber constructed_seq_; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // requirements. By ordering this way, the linker will need to do some work to | 165 // requirements. By ordering this way, the linker will need to do some work to |
| 164 // ensure proper alignment of the static data. | 166 // ensure proper alignment of the static data. |
| 165 static LazyInstance<AlignedData<4> > align4 = LAZY_INSTANCE_INITIALIZER; | 167 static LazyInstance<AlignedData<4> > align4 = LAZY_INSTANCE_INITIALIZER; |
| 166 static LazyInstance<AlignedData<32> > align32 = LAZY_INSTANCE_INITIALIZER; | 168 static LazyInstance<AlignedData<32> > align32 = LAZY_INSTANCE_INITIALIZER; |
| 167 static LazyInstance<AlignedData<4096> > align4096 = LAZY_INSTANCE_INITIALIZER; | 169 static LazyInstance<AlignedData<4096> > align4096 = LAZY_INSTANCE_INITIALIZER; |
| 168 | 170 |
| 169 EXPECT_ALIGNED(align4.Pointer(), 4); | 171 EXPECT_ALIGNED(align4.Pointer(), 4); |
| 170 EXPECT_ALIGNED(align32.Pointer(), 32); | 172 EXPECT_ALIGNED(align32.Pointer(), 32); |
| 171 EXPECT_ALIGNED(align4096.Pointer(), 4096); | 173 EXPECT_ALIGNED(align4096.Pointer(), 4096); |
| 172 } | 174 } |
| OLD | NEW |