summaryrefslogtreecommitdiff
path: root/src/storage/dram.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-09 20:55:45 -0400
committerbd <bdunahu@operationnull.com>2025-03-09 20:55:45 -0400
commit4dc12d82699520bdc6875e5177ae8a6a2c2dea04 (patch)
tree49f366ddfbcd7dbfaea6ad7e1055ccc0c876d811 /src/storage/dram.cc
parentf70f5b1c3a2fd28be0c811e0ea714661c2f3f16a (diff)
initialize wait_time in dram to resolve undefined behavior
Diffstat (limited to 'src/storage/dram.cc')
-rw-r--r--src/storage/dram.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/storage/dram.cc b/src/storage/dram.cc
index 23dedc0..9dab4ed 100644
--- a/src/storage/dram.cc
+++ b/src/storage/dram.cc
@@ -8,9 +8,10 @@ Dram::Dram(int lines, int delay)
this->data = new std::vector<std::array<signed int, LINE_SIZE>>;
this->data->resize(lines);
this->delay = delay;
- this->wait_time = this->delay;
+ this->is_waiting = false;
this->lower = nullptr;
this->requester = IDLE;
+ this->wait_time = this->delay;
}
Dram::~Dram() { delete this->data; }