diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-04-09 14:51:05 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-04-14 10:07:47 -0700 |
commit | a8e8f9c0a8e259a807d7b99a148d14104c24209d (patch) | |
tree | d8ed041dd3cf490163f6b405102ea36d3b4b0828 /runtime/globals.h | |
parent | 043a7a6182870964021476484b1534106ff20600 (diff) | |
download | art-a8e8f9c0a8e259a807d7b99a148d14104c24209d.zip art-a8e8f9c0a8e259a807d7b99a148d14104c24209d.tar.gz art-a8e8f9c0a8e259a807d7b99a148d14104c24209d.tar.bz2 |
Refactor space bitmap to support different alignments.
Required for:
Using space bitmaps instead of std::set in mod union table +
remembered set.
Using a bitmap instead of set for large object marking.
Bug: 13571028
Change-Id: Id024e9563d4ca4278f79607cdb2f81895121b113
Diffstat (limited to 'runtime/globals.h')
-rw-r--r-- | runtime/globals.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/globals.h b/runtime/globals.h index 7e85231..e3c54b8 100644 --- a/runtime/globals.h +++ b/runtime/globals.h @@ -50,9 +50,6 @@ static constexpr size_t kWordHighBitMask = static_cast<size_t>(1) << (kBitsPerWo // Required stack alignment static constexpr size_t kStackAlignment = 16; -// Required object alignment -static constexpr size_t kObjectAlignment = 8; - // ARM instruction alignment. ARM processors require code to be 4-byte aligned, // but ARM ELF requires 8.. static constexpr size_t kArmAlignment = 8; @@ -72,6 +69,10 @@ static constexpr size_t kX86Alignment = 16; // compile-time constant so the compiler can generate better code. static constexpr int kPageSize = 4096; +// Required object alignment +static constexpr size_t kObjectAlignment = 8; +static constexpr size_t kLargeObjectAlignment = kPageSize; + // Whether or not this is a debug build. Useful in conditionals where NDEBUG isn't. #if defined(NDEBUG) static constexpr bool kIsDebugBuild = false; |