Skip to content

Commit

Permalink
testing3
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Dec 16, 2023
1 parent 8c211b5 commit 05766d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/devices/disk_track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
DiskTrack::~DiskTrack()
{
// Release memory, but do not save automatically
free(dt.buffer); // NOSONAR free() must be used here because of allocation with posix_memalign
free(dt.buffer); // d here because of allocation with posix_memalign
}

void DiskTrack::Init(int track, int size, int sectors, bool raw, off_t imgoff)
Expand Down Expand Up @@ -88,7 +88,7 @@ bool DiskTrack::Load(const string &path, uint64_t &cache_miss_read_count)

// Reallocate if the buffer length is different
if (dt.length != static_cast<uint32_t>(length)) {
free(dt.buffer); // NOSONAR free() must be used here because of allocation with posix_memalign
free(dt.buffer); // free() must be used here because of allocation with posix_memalign
if (posix_memalign((void**)&dt.buffer, 512, ((length + 511) / 512) * 512)) {
spdlog::warn("posix_memalign failed");
}
Expand Down Expand Up @@ -211,7 +211,7 @@ bool DiskTrack::Save(const string &path, uint64_t &cache_miss_write_count)
}

// Drop the change flag and exit
fill(dt.changemap.begin(), dt.changemap.end(), false); // NOSONAR ranges::fill() cannot be applied to vector<bool>
fill(dt.changemap.begin(), dt.changemap.end(), false); // ranges::fill() cannot be applied to vector<bool>
dt.changed = false;

return true;
Expand Down

0 comments on commit 05766d7

Please sign in to comment.