Fix calculation of compressed size in bytes (#534)
An integer division in the compression:Base:getSize() was being done, which led to rounding down instead of up. Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
This commit is contained in:
2
src/mem/cache/compressors/base.cc
vendored
2
src/mem/cache/compressors/base.cc
vendored
@@ -78,7 +78,7 @@ Base::CompressionData::getSizeBits() const
|
||||
std::size_t
|
||||
Base::CompressionData::getSize() const
|
||||
{
|
||||
return std::ceil(_size/8);
|
||||
return std::ceil(_size/(float)CHAR_BIT);
|
||||
}
|
||||
|
||||
Base::Base(const Params &p)
|
||||
|
||||
Reference in New Issue
Block a user