diff --git a/cache_utils/src/bin/l3.rs b/cache_utils/src/bin/l3.rs new file mode 100644 index 0000000..829a8dc --- /dev/null +++ b/cache_utils/src/bin/l3.rs @@ -0,0 +1,13 @@ +use cache_utils::flush; +use cache_utils::mmap::MMappedMemory; + +pub fn main() { + let m = unsafe { MMappedMemory::new(2 << 20) }; + let array = m.slice(); + loop { + unsafe { + flush(&array[0]); + flush(&array[(1 << 8) ^ (1 << 12) ^ (1 << 10)]); + } + } +} diff --git a/cache_utils/src/complex_addressing.rs b/cache_utils/src/complex_addressing.rs new file mode 100644 index 0000000..e69de29 diff --git a/cache_utils/src/main.rs b/cache_utils/src/main.rs index ae65634..d758f2c 100644 --- a/cache_utils/src/main.rs +++ b/cache_utils/src/main.rs @@ -57,6 +57,7 @@ pub fn main() { };*/ let m = unsafe { MMappedMemory::new(SIZE) }; let array = m.slice(); + /* let p = Box::new(Page { mem: [0; 4096] });