From 270d5c95c46385b7f8c3ad5ffd1adb4ac5a43acb Mon Sep 17 00:00:00 2001 From: bd Date: Sat, 26 Apr 2025 23:49:35 -0400 Subject: Fix bug which caused a very large allocation --- gui/gui.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gui/gui.cc') 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); -- cgit v1.2.3