diff options
| author | Dan Engelbrecht <[email protected]> | 2023-12-01 07:57:13 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-01 13:57:13 +0100 |
| commit | 2755b0dbfd47237e018048598e9c85c71b9a0736 (patch) | |
| tree | ca1e55c43555fc2ff43455f8dfc4ac28daebe42b /src/zenserver/cache/cachedisklayer.h | |
| parent | add separate PreCache step for GcReferenceChecker (#578) (diff) | |
| download | zen-2755b0dbfd47237e018048598e9c85c71b9a0736.tar.xz zen-2755b0dbfd47237e018048598e9c85c71b9a0736.zip | |
use 32 bit offset and size in BlockStoreLocation (#581)
- Improvement: Reduce memory usage in GC and diskbucket flush
Diffstat (limited to 'src/zenserver/cache/cachedisklayer.h')
| -rw-r--r-- | src/zenserver/cache/cachedisklayer.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenserver/cache/cachedisklayer.h b/src/zenserver/cache/cachedisklayer.h index 55d2a98f4..11f474d5a 100644 --- a/src/zenserver/cache/cachedisklayer.h +++ b/src/zenserver/cache/cachedisklayer.h @@ -29,7 +29,7 @@ struct DiskLocation inline DiskLocation(uint64_t ValueSize, uint8_t Flags) : Flags(Flags | kStandaloneFile) { Location.StandaloneSize = ValueSize; } - inline DiskLocation(const BlockStoreLocation& Location, uint64_t PayloadAlignment, uint8_t Flags) : Flags(Flags & ~kStandaloneFile) + inline DiskLocation(const BlockStoreLocation& Location, uint32_t PayloadAlignment, uint8_t Flags) : Flags(Flags & ~kStandaloneFile) { this->Location.BlockLocation = BlockStoreDiskLocation(Location, PayloadAlignment); } @@ -47,7 +47,7 @@ struct DiskLocation return Location.BlockLocation != Rhs.Location.BlockLocation; } - inline BlockStoreLocation GetBlockLocation(uint64_t PayloadAlignment) const + inline BlockStoreLocation GetBlockLocation(uint32_t PayloadAlignment) const { ZEN_ASSERT(!(Flags & kStandaloneFile)); return Location.BlockLocation.Get(PayloadAlignment); @@ -106,7 +106,7 @@ public: struct BucketConfiguration { uint64_t MaxBlockSize = 1ull << 30; - uint64_t PayloadAlignment = 1ull << 4; + uint32_t PayloadAlignment = 1u << 4; uint64_t MemCacheSizeThreshold = 1 * 1024; uint64_t LargeObjectThreshold = 128 * 1024; bool EnableReferenceCaching = false; |