Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: test/unittests/zone/zone-unittest.cc

Issue 2672203002: Ensure we align zone memory at 8 byte boundaries on all platforms (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/unittests/unittests.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/zone/zone.h"
6
7 #include "src/zone/accounting-allocator.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace v8 {
11 namespace internal {
12
13 TEST(Zone, 8ByteAlignment) {
14 AccountingAllocator allocator;
15 Zone zone(&allocator, ZONE_NAME);
16
17 for (size_t i = 0; i < 16; ++i) {
18 ASSERT_EQ(reinterpret_cast<intptr_t>(zone.New(i)) % 8, 0);
19 }
20 }
21
22 } // namespace internal
23 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/unittests.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698