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

Unified Diff: src/zone/zone.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/zone/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone/zone.h
diff --git a/src/zone/zone.h b/src/zone/zone.h
index 4e3b96eb206e8ff1a247130600ea3ac5e341e3c8..dbc1dadadd6d99d778af7a53a6b52904a2d1ae2b 100644
--- a/src/zone/zone.h
+++ b/src/zone/zone.h
@@ -63,16 +63,8 @@ class V8_EXPORT_PRIVATE Zone final {
AccountingAllocator* allocator() const { return allocator_; }
private:
-// All pointers returned from New() have this alignment. In addition, if the
-// object being allocated has a size that is divisible by 8 then its alignment
-// will be 8. ASan requires 8-byte alignment. MIPS also requires 8-byte
-// alignment.
-#if defined(V8_USE_ADDRESS_SANITIZER) || defined(V8_TARGET_ARCH_MIPS)
- static const size_t kAlignment = 8;
- STATIC_ASSERT(kPointerSize <= 8);
-#else
- static const size_t kAlignment = kPointerSize;
-#endif
+ // All pointers returned from New() are 8-byte aligned.
+ static const size_t kAlignmentInBytes = 8;
// Never allocate segments smaller than this size in bytes.
static const size_t kMinimumSegmentSize = 8 * KB;
« no previous file with comments | « no previous file | src/zone/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698