summaryrefslogtreecommitdiff
path: root/gui/gui.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-04-26 23:49:35 -0400
committerbd <bdunahu@operationnull.com>2025-04-26 23:49:35 -0400
commit270d5c95c46385b7f8c3ad5ffd1adb4ac5a43acb (patch)
tree49ac24e66f02c2d7ceb589d28c5fab593059d0c4 /gui/gui.cc
parentd449750f789076459de8d47c2960a1279e543c32 (diff)
Fix bug which caused a very large allocation
Diffstat (limited to 'gui/gui.cc')
-rw-r--r--gui/gui.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/gui/gui.cc b/gui/gui.cc
index 7df1bfc..6e7da5f 100644
--- a/gui/gui.cc
+++ b/gui/gui.cc
@@ -358,16 +358,13 @@ void GUI::make_tabs(int num)
e = new StorageView(0, this);
} else if (i == num - 1) {
n = "DRAM";
- e = new StorageView(4, this);
+ e = new StorageView(MEM_LINES, this);
} else {
n = QString("L%1").arg(i);
e = new StorageView(
- // cache_size_mapper(this->curr_cache_levels-1, i-1)
- 4, this);
+ (1 << cache_size_mapper(this->curr_cache_levels - 1, i - 1)),
+ this);
}
- std::cout << "total levels: " << num << ":"
- << this->curr_cache_levels - 1 << " level: " << i
- << std::endl;
t = new QTableView(ui->storage);
t->setModel(e);