aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine/memory.cpp')
-rw-r--r--qtmips_machine/memory.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qtmips_machine/memory.cpp b/qtmips_machine/memory.cpp
index 3d711cc..23743d5 100644
--- a/qtmips_machine/memory.cpp
+++ b/qtmips_machine/memory.cpp
@@ -1,5 +1,7 @@
#include "memory.h"
+using namespace machine;
+
// Note about endianness: Current memory implementation is expected to be a big endian.
// But we can be running on little endian so we should do conversion from bytes to word according that.
@@ -157,10 +159,12 @@ bool MemorySection::operator!=(const MemorySection &ms) const {
#error Memory tree have to be higher or in limit equal to two
#endif
+namespace machine {
union MemoryTree {
union MemoryTree *mt;
MemorySection *sec;
};
+}
Memory::Memory() {
this->mt_root = allocate_section_tree();