Skip to content

Commit

Permalink
Consistent use of types.
Browse files Browse the repository at this point in the history
  • Loading branch information
baldersheim committed Feb 12, 2022
1 parent b4dc1f2 commit a29e2ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vespamalloc/src/vespamalloc/malloc/datasegment.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DataSegment
checkAndLogBigSegment();
}
void enableThreadSupport() { _mutex.init(); }
static uint32_t blockId(const void * ptr) {
static BlockIdT blockId(const void * ptr) {
return (size_t(ptr) - Memory::getMinPreferredStartAddress())/BlockSize;
}
static void * fromBlockId(size_t id) {
Expand Down Expand Up @@ -71,13 +71,13 @@ class DataSegment
BlockT(SizeClassT szClass = UNUSED_BLOCK, BlockIdT numBlocks = 0)
: _sizeClass(szClass), _freeChainLength(0), _realNumBlocks(numBlocks)
{ }
SizeClassT sizeClass() const { return _sizeClass; }
SizeClassT sizeClass() const { return _sizeClass; }
BlockIdT realNumBlocks() const { return _realNumBlocks; }
BlockIdT freeChainLength() const { return _freeChainLength; }
void sizeClass(SizeClassT sc) { _sizeClass = sc; }
void sizeClass(SizeClassT sc) { _sizeClass = sc; }
void realNumBlocks(BlockIdT fc) { _realNumBlocks = fc; }
void freeChainLength(BlockIdT fc) { _freeChainLength = fc; }
size_t getMaxSize() const {
size_t getMaxSize() const {
return MemBlockPtrT::unAdjustSize(std::min(MemBlockPtrT::classSize(_sizeClass),
size_t(_realNumBlocks) * BlockSize));
}
Expand Down

0 comments on commit a29e2ad

Please sign in to comment.