Skip to content

Commit

Permalink
fix ubuntu build
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyMakeev committed Oct 7, 2023
1 parent 574eeec commit 28aa194
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions SmMalloc/smmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,20 +374,29 @@ class Allocator
};

// 8 bytes
std::atomic<uint64_t> head = TaggedIndex::Invalid;
std::atomic<uint64_t> head;
// 4/8 bytes
uint8_t* pData = nullptr;
uint8_t* pData;
// 4/8 bytes
uint8_t* pBufferEnd = nullptr;
uint8_t* pBufferEnd;
// 4 bytes
std::atomic<uint32_t> globalTag = 0;
std::atomic<uint32_t> globalTag;

// 64 bytes
char padding[SMM_CACHE_LINE_SIZE] = {0};
char padding[SMM_CACHE_LINE_SIZE];

#ifdef SMMALLOC_STATS_SUPPORT
BucketStats bucketStats;
#endif

PoolBucket()
: head(TaggedIndex::Invalid)
, globalTag(0)
, pData(nullptr)
, pBufferEnd(nullptr)
{
}

void Create(size_t elementSize);

SMM_INLINE void* Alloc()
Expand Down

0 comments on commit 28aa194

Please sign in to comment.