1
0
Fork 0

Fixed data layout of cache buckets for 32-bit systems.

This commit is contained in:
Dan Larkin 2017-04-27 18:25:42 -04:00
parent 837763097a
commit f4a8b6911f
2 changed files with 8 additions and 6 deletions

View File

@ -54,7 +54,7 @@ struct PlainBucket {
// padding, if necessary? // padding, if necessary?
#ifdef TRI_PADDING_32 #ifdef TRI_PADDING_32
uint32_t _padding[3]; uint32_t _padding[slotsData];
#endif #endif
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -29,6 +29,8 @@
#include "Cache/Common.h" #include "Cache/Common.h"
#include "Cache/State.h" #include "Cache/State.h"
#include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <atomic> #include <atomic>
@ -53,16 +55,16 @@ struct TransactionalBucket {
uint32_t _cachedHashes[slotsData]; uint32_t _cachedHashes[slotsData];
CachedValue* _cachedData[slotsData]; CachedValue* _cachedData[slotsData];
// padding, if necessary?
#ifdef TRI_PADDING_32
uint32_t _padding[slotsData];
#endif
// blacklist entries for transactional semantics // blacklist entries for transactional semantics
static constexpr size_t slotsBlacklist = 4; static constexpr size_t slotsBlacklist = 4;
uint32_t _blacklistHashes[slotsBlacklist]; uint32_t _blacklistHashes[slotsBlacklist];
uint64_t _blacklistTerm; uint64_t _blacklistTerm;
// padding, if necessary?
#ifdef TRI_PADDING_32
uint32_t _padding[3];
#endif
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
/// @brief Initialize an empty bucket. /// @brief Initialize an empty bucket.
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////